1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 21:07:35 +00:00

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

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