From: Holger Schemel Date: Sat, 21 Oct 2017 14:36:44 +0000 (+0200) Subject: fixed bug that could cause crash when artwork changes editor palette size X-Git-Tag: 4.1.0.0~88 X-Git-Url: https://git.artsoft.org/?a=commitdiff_plain;h=4e9530d1cc582e710761b638de9dcb39935484f2;p=rocksndiamonds.git fixed bug that could cause crash when artwork changes editor palette size --- diff --git a/src/editor.c b/src/editor.c index cef0b287..0c065762 100644 --- a/src/editor.c +++ b/src/editor.c @@ -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));