fixed bug that could cause crash when artwork changes editor palette size
authorHolger Schemel <info@artsoft.org>
Sat, 21 Oct 2017 14:36:44 +0000 (16:36 +0200)
committerHolger Schemel <info@artsoft.org>
Fri, 23 Mar 2018 22:21:14 +0000 (23:21 +0100)
src/editor.c

index cef0b2875b2430259ceef346eea90e00777abd1a..0c065762676cf00ea4414de701941997cda8b449 100644 (file)
@@ -5688,6 +5688,10 @@ static void ReinitializeElementList()
 
     num_editor_elements += num_editor_el_empty;
   }
+  else
+  {
+    num_editor_el_empty = 0;
+  }
 
   editor_elements = checked_malloc(num_editor_elements * sizeof(int));