mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-25 09:00:22 +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
Notes:
sideshowbarker
2024-07-19 06:00:14 +09:00
Author: https://github.com/gabrielgggg 🔰 Commit: https://github.com/SerenityOS/serenity/commit/8e151ff33e3 Pull-request: https://github.com/SerenityOS/serenity/pull/2433
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…
Reference in a new issue