[gnome-system-monitor/gnome-3-4] tree_store_update: gracefully handle null strings



commit f0b7d0c8d8fc0e50654073e3ed4adb87e52154f6
Author: Pavel Vasin <rat4vier gmail com>
Date:   Mon Apr 2 20:21:24 2012 +0400

    tree_store_update: gracefully handle null strings
    
    https://bugzilla.gnome.org/show_bug.cgi?id=672741

 src/util.cpp |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/util.cpp b/src/util.cpp
index 4aef576..33e9d0f 100644
--- a/src/util.cpp
+++ b/src/util.cpp
@@ -568,7 +568,7 @@ namespace procman
 
         gtk_tree_model_get(model, iter, column, &current_value, -1);
 
-        if (!current_value or std::strcmp(current_value, new_value) != 0)
+        if (g_strcmp0(current_value, new_value) != 0)
             gtk_tree_store_set(GTK_TREE_STORE(model), iter, column, new_value, -1);
 
         g_free(current_value);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]