From 0e08c4146257bcd87fb9bcab9f4bd6d67c474271 Mon Sep 17 00:00:00 2001 From: Sergii Pylypenko Date: Tue, 30 Nov 2021 00:31:30 +0200 Subject: [PATCH] Fixed a crash in the game options --- src/settings_gui.cpp | 2 ++ src/widgets/dropdown.cpp | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 9b8aa273a4..e98f8da8ab 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -672,9 +672,11 @@ struct GameOptionsWindow : Window { #endif this->SetWidgetLoweredState(WID_GO_MOUSE_CURSOR, _settings_client.gui.draw_mouse_cursor); +#if 0 #ifndef __APPLE__ this->SetWidgetLoweredState(WID_GO_VIDEO_VSYNC_BUTTON, _video_vsync); this->SetWidgetDisabledState(WID_GO_VIDEO_VSYNC_BUTTON, !_video_hw_accel); +#endif #endif bool missing_files = BaseGraphics::GetUsedSet()->GetNumMissing() == 0; diff --git a/src/widgets/dropdown.cpp b/src/widgets/dropdown.cpp index fc0b32f643..4589429ffc 100644 --- a/src/widgets/dropdown.cpp +++ b/src/widgets/dropdown.cpp @@ -356,7 +356,7 @@ struct DropdownWindow : Window { if (_left_button_down && !this->left_button_state && ( _cursor.pos.x < this->left || _cursor.pos.x > this->left + this->width || _cursor.pos.y < this->top || _cursor.pos.y > this->top + this->height)) { - delete this; + this->Close(); return; } else { if (_left_button_down && !this->left_button_state) {