mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03: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
@ -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 New Issue
Block a user