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.
This commit is contained in:
Gabriel Mihalache 2020-05-29 01:58:22 -04:00 committed by GitHub
parent 664085b719
commit 8e151ff33e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: sideshowbarker 2024-07-19 06:00:14 +09:00

View File

@ -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));