gnome-system-monitor r2587 - trunk/src



Author: bdejean
Date: Fri Feb 27 22:01:53 2009
New Revision: 2587
URL: http://svn.gnome.org/viewvc/gnome-system-monitor?rev=2587&view=rev

Log:
make_string: don't crash on NULL strings.
Closes #573030.


Modified:
   trunk/src/util.h

Modified: trunk/src/util.h
==============================================================================
--- trunk/src/util.h	(original)
+++ trunk/src/util.h	Fri Feb 27 22:01:53 2009
@@ -45,6 +45,11 @@
 
 inline string make_string(char *c_str)
 {
+	if (!c_str) {
+		procman_debug("NULL string");
+		return string();
+	}
+
 	string s(c_str);
 	g_free(c_str);
 	return s;



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