1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 17:37:37 +00:00

PixelPaint: Keep a RefPtr to offset_text_box in EditGuideDialog

Keep a RefPtr to offset_text_box in EditGuideDialog instead of using
a local pointer. Previously the lambda in ok_button.on_click() would
outlive the local variable causing a crash.
This commit is contained in:
Marcus Nilsson 2021-11-27 10:41:48 +01:00 committed by Andreas Kling
parent 95c0ec9afc
commit 67f349be46
2 changed files with 8 additions and 7 deletions

View file

@ -26,7 +26,7 @@ private:
String m_offset;
Guide::Orientation m_orientation;
RefPtr<GUI::TextBox> m_offset_text_box;
bool m_is_horizontal_checked { false };
bool m_is_vertical_checked { false };
};