mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 10:57:35 +00:00
PixelPaint: Make PaletteWidget::set_image_editor take a ImageEditor*
After closing the last open ImageEditor, selecting a color would try to dereference it causing a crash. Instead make set_image_editor() take a pointer to it and set it to nullptr when closing the last tab like we do with LayerListWidget and LayerPropertiesWidget.
This commit is contained in:
parent
29bbf56286
commit
7ca4d045bd
3 changed files with 16 additions and 10 deletions
|
@ -35,7 +35,7 @@ public:
|
|||
static Result<void, String> save_palette_fd_and_close(Vector<Color>, int);
|
||||
static Vector<Color> fallback_colors();
|
||||
|
||||
void set_image_editor(ImageEditor&);
|
||||
void set_image_editor(ImageEditor*);
|
||||
|
||||
private:
|
||||
static Result<Vector<Color>, String> load_palette_file(Core::File&);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue