diff --git a/src/Palette/PaletteGrid.gd b/src/Palette/PaletteGrid.gd index bc5c5a410..ffc80527e 100644 --- a/src/Palette/PaletteGrid.gd +++ b/src/Palette/PaletteGrid.gd @@ -87,6 +87,8 @@ func scroll_palette(origin: Vector2i) -> void: ## Called when the color changes, either the left or the right, determined by [param mouse_button]. ## If current palette has [param target_color] as a [Color], then select it. func find_and_select_color(target_color: Color, mouse_button: int) -> void: + if not is_instance_valid(current_palette): + return var old_index := Palettes.current_palette_get_selected_color_index(mouse_button) for color_ind in swatches.size(): if (