mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-01-18 09:09:47 +00:00
Fix crash when Pixelorama starts without a palette
This commit is contained in:
parent
658477ed4b
commit
5f53a3eb7b
|
@ -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 (
|
||||
|
|
Loading…
Reference in a new issue