From d0a2093a619f6e28ab20779de22459856e23811a Mon Sep 17 00:00:00 2001 From: Otavio Napoli Date: Tue, 8 Oct 2019 17:55:44 -0300 Subject: [PATCH] Fix invalid scrollbar index to add a label --- panel-plugin/weather-config.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c index 167d8f0..5911364 100644 --- a/panel-plugin/weather-config.c +++ b/panel-plugin/weather-config.c @@ -1438,6 +1438,8 @@ button_add_option_clicked(GtkWidget *widget, { xfceweather_dialog *dialog = (xfceweather_dialog *) user_data; gint index = gtk_combo_box_get_active (GTK_COMBO_BOX (dialog->options_datatypes)); + if (index < 0) + return FALSE; add_model_option(dialog->model_datatypes, index); update_scrollbox_labels(dialog); -- 2.20.1