From 8e151ff33e3459f3d7f71feb429122424228fb31 Mon Sep 17 00:00:00 2001 From: Gabriel Mihalache Date: Fri, 29 May 2020 01:58:22 -0400 Subject: [PATCH] PixelPaint: Set active layer to nullptr after its removal (#2433) This prevents a crash if removal was called twice, without setting a new active layer in the meanwhile. --- Applications/PixelPaint/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Applications/PixelPaint/main.cpp b/Applications/PixelPaint/main.cpp index bdc59b0cdc..e44c642a3a 100644 --- a/Applications/PixelPaint/main.cpp +++ b/Applications/PixelPaint/main.cpp @@ -184,6 +184,7 @@ int main(int argc, char** argv) if (!active_layer) return; image_editor.image()->remove_layer(*active_layer); + image_editor.set_active_layer(nullptr); }, window));