[Xfce4-commits] [panel-plugins/xfce4-weather-plugin] 01/01: Fix invalid scrollbar index to add a label (Bug #16023)

noreply at xfce.org noreply at xfce.org
Tue Jan 7 03:24:28 CET 2020


This is an automated email from the git hooks/post-receive script.

a   n   d   r   e       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository panel-plugins/xfce4-weather-plugin.

commit 7336cb77b1587ce433c617f15063fae3188d2a72
Author: Otavio Napoli <otavio.napoli at gmail.com>
Date:   Tue Oct 8 17:55:44 2019 -0300

    Fix invalid scrollbar index to add a label (Bug #16023)
---
 panel-plugin/weather-config.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/panel-plugin/weather-config.c b/panel-plugin/weather-config.c
index 167d8f0..67db509 100644
--- a/panel-plugin/weather-config.c
+++ b/panel-plugin/weather-config.c
@@ -1438,9 +1438,10 @@ 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));
-
-    add_model_option(dialog->model_datatypes, index);
-    update_scrollbox_labels(dialog);
+    if (index >= 0) {
+        add_model_option(dialog->model_datatypes, index);
+        update_scrollbox_labels(dialog);
+    }
     return FALSE;
 }
 

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list