From 3366ed7dde678c27b3ea304c861e08162473d5b5 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Mon, 4 Aug 2025 11:31:34 +0600 Subject: [PATCH] Crash fix --- source/ubl-settings-video-monitor.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/source/ubl-settings-video-monitor.c b/source/ubl-settings-video-monitor.c index 3193f41..0889870 100644 --- a/source/ubl-settings-video-monitor.c +++ b/source/ubl-settings-video-monitor.c @@ -402,13 +402,17 @@ void on_monitor_configure(GtkWidget *,monitor_data *window){ resolution = current; } - if (!yon_char_is_empty(target)&&!yon_char_is_empty(resolutions)&&!strstr(resolutions,resolution)){ + if (!yon_char_is_empty(resolution)&&!yon_char_is_empty(target)&&!yon_char_is_empty(resolutions)&&!strstr(resolutions,resolution)){ gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(monitors->UnsupportedCheck),1); while(gtk_events_pending()) gtk_main_iteration(); } + if (!yon_char_is_empty(resolution)){ gtk_combo_box_set_active_id(GTK_COMBO_BOX(monitors->ResolutionCombo),resolution); + }else{ + gtk_combo_box_set_active(GTK_COMBO_BOX(monitors->ResolutionCombo),0); + } } } gtk_widget_show(monitors->MainWindow);