diff --git a/AdjustableModPanel.version b/AdjustableModPanel.version index 5e485ba..38249f5 100644 --- a/AdjustableModPanel.version +++ b/AdjustableModPanel.version @@ -9,22 +9,22 @@ "VERSION": { "MAJOR": 1, "MINOR": 5, - "PATCH": 1, + "PATCH": 2, "BUILD": 0 }, "KSP_VERSION": { "MAJOR": 1, - "MINOR": 6, + "MINOR": 7, "PATCH": 0 }, "KSP_VERSION_MIN": { "MAJOR": 1, - "MINOR": 6, + "MINOR": 7, "PATCH": 0 }, "KSP_VERSION_MAX": { "MAJOR": 1, - "MINOR": 6, + "MINOR": 7, "PATCH": 99 } } \ No newline at end of file diff --git a/ModPanelComponent.cs b/ModPanelComponent.cs index c0c9421..d2f9b7b 100644 --- a/ModPanelComponent.cs +++ b/ModPanelComponent.cs @@ -84,6 +84,11 @@ public void Update () { myButton = mod; } var texture = (Texture2D) button.sprite.texture; + + // button without a texture - very unnatural. Better ignore. + if (texture == null) + continue; + var func = button.onTrue.GetInvocationList ()[1]; var method = func.Method.Name; var module = func.Method.Module.Name;