Skip to content
Snippets Groups Projects
Commit d8c52448 authored by Jasper Huijsmans's avatar Jasper Huijsmans
Browse files

Check for NULL pointers in DBG messages to prevent crashes on Solaris, based...

Check for NULL pointers in DBG messages to prevent crashes on Solaris, based on patch from William Bonnet (bug #2922).

(Old svn revision: 24991)
parent fff160e1
No related branches found
No related tags found
No related merge requests found
......@@ -360,7 +360,7 @@ start_element_handler (GMarkupParseContext *context,
++i;
}
if (name != NULL)
if (name != NULL && value != NULL)
{
DBG ("Add item: name=\"%s\", id=\"%s\"", name, value);
......
......@@ -297,6 +297,13 @@ update_plugin_list (void)
else
{
dirs = xfce_resource_dirs (XFCE_RESOURCE_DATA);
if (G_UNLIKELY(!dirs))
{
dirs = g_new (char*, 2);
dirs[0] = g_strdup (DATADIR);
dirs[1] = NULL;
}
}
for (d = dirs; *d != NULL || !datadir_used; ++d)
......@@ -343,9 +350,12 @@ update_plugin_list (void)
{
DBG (" + class \"%s\": "
"name=%s, comment=%s, icon=%s, external=%d, path=%s",
class->plugin_name,
class->name, class->comment, class->icon,
class->is_external, class->file);
class->plugin_name ? class->plugin_name : "(null)",
class->name ? class->name : "(null)",
class->comment ? class->comment : "(null)",
class->icon ? class->icon : "(null)",
class->is_external,
class->file ? class->file : "(null)");
g_hash_table_insert (plugin_classes,
class->plugin_name,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment