diff --git a/loader/src/ui/mods/settings/ModSettingsPopup.cpp b/loader/src/ui/mods/settings/ModSettingsPopup.cpp index 5c831fad..45d519a6 100644 --- a/loader/src/ui/mods/settings/ModSettingsPopup.cpp +++ b/loader/src/ui/mods/settings/ModSettingsPopup.cpp @@ -290,19 +290,21 @@ bool ModSettingsPopup::hasUncommitted() const { } void ModSettingsPopup::onClose(CCObject* sender) { - if (sender && this->hasUncommitted()) { + if (this->hasUncommitted()) { createQuickPopup( "Unsaved Changes", "You have unsaved changes! Are you sure you " "want to exit?", "Cancel", "Discard", [this](FLAlertLayer*, bool btn2) { - if (btn2) this->onClose(nullptr); + if (btn2) { + GeodePopup::onClose(nullptr); + } } ); return; } - Popup::onClose(sender); + GeodePopup::onClose(sender); } ModSettingsPopup* ModSettingsPopup::create(Mod* mod) {