[Xfce4-commits] [panel-plugins/xfce4-sensors-plugin] 02/03: applied patch from bug report 11544

noreply at xfce.org noreply at xfce.org
Mon Feb 23 21:54:23 CET 2015


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

timystery pushed a commit to branch master
in repository panel-plugins/xfce4-sensors-plugin.

commit 8bd989908363709bfe1f1f0156a01dc67c9e6a0d
Author: Fabian <timystery at arcor.de>
Date:   Mon Feb 23 21:53:33 2015 +0100

    applied patch from bug report 11544
---
 lib/configuration.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/configuration.c b/lib/configuration.c
index 00c1ce5..50fa5bb 100644
--- a/lib/configuration.c
+++ b/lib/configuration.c
@@ -345,9 +345,9 @@ sensors_read_config (XfcePanelPlugin *plugin, t_sensors *sensors)
                   break;
               //DBG("k=%d, chip=%p, name=.\n", k, chip);
               }
-            while (chip!=NULL && strcmp(chip->sensorId, sensorName) != 0 );
+            while (chip!=NULL && sensorName != NULL && strcmp(chip->sensorId, sensorName) != 0 );
             //DBG("Found a chip.\n");
-            if ( chip!=NULL && strcmp(chip->sensorId, sensorName)==0 ) {
+            if ( chip!=NULL && sensorName != NULL && strcmp(chip->sensorId, sensorName)==0 ) {
 
                 for (j=0; j<chip->num_features; j++) {
                     chipfeature = (t_chipfeature *) g_ptr_array_index (
@@ -421,7 +421,8 @@ sensors_read_config (XfcePanelPlugin *plugin, t_sensors *sensors)
 
             } /* end if chip && strcmp */
 
-            g_free (sensorName);
+            if (sensorName != NULL)
+              g_free (sensorName);
 
         } /* end if xfce_rc_has_group (rc, rc_chip) */
 

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


More information about the Xfce4-commits mailing list