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:
parent
664085b719
commit
8e151ff33e
1 changed files with 1 additions and 0 deletions
|
@ -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));
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue