Commit a8c0351c authored by Ivan Yossi's avatar Ivan Yossi 👌

Close ColorDialog if parent pointer is destroyed

On macOS if the parent pointer is missing there is a crash, if the 
parent widget is destroyed we close the colorDialog to avoid
avoid crashing when interacting with the orphan ColorDialog

BUG:413922
parent e27ab3a7
......@@ -39,6 +39,11 @@ class KisColorButton::KisColorButtonPrivate
{
public:
KisColorButtonPrivate(KisColorButton *q);
~KisColorButtonPrivate() {
if (dialogPtr) {
dialogPtr.data()->close();
}
}
void _k_chooseColor();
void _k_colorChosen();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment