Skip to content

Commit d0e8219

Browse files
committed
windows /O2 crashfix
1 parent 03b0329 commit d0e8219

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

freesprite/BasePopup.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,11 @@ void BasePopup::closePopup() {
8787
if (callback != NULL) {
8888
callback->eventPopupClosed(callback_id, this);
8989
}
90-
delete this;
90+
91+
//delete it next frame to avoid any complications
92+
g_startNewMainThreadOperation([this]() {
93+
delete this;
94+
});
9195
}
9296

9397
XY BasePopup::makeTitleAndDesc(std::string title, std::string desc) {

0 commit comments

Comments
 (0)