grim/guifications2

3d05b66b03f8
Parents 70b5ebc7b69a
Children 687fb7edee45
fixed a null pointer deference that scan-build caught...
--- a/src/gf_notification.c Sun Dec 04 21:16:07 2011 -0600
+++ b/src/gf_notification.c Tue Jan 17 19:07:45 2012 -0600
@@ -449,17 +449,23 @@
for(t = gf_theme_get_notifications(theme); t; t = t->next) {
notification = GF_NOTIFICATION(t->data);
+ if(notification == NULL)
+ continue;
+
if(!gf_utils_strcmp(notification->n_type, n_type))
n = g_list_append(n, notification);
}
len = g_list_length(n);
- if(len == 0)
+ if(len == 0) {
notification = NULL;
- else if(len == 1)
- notification = GF_NOTIFICATION(n->data);
- else {
+ } else if(len == 1) {
+ if(n != NULL)
+ notification = GF_NOTIFICATION(n->data);
+ else
+ notification = NULL;
+ } else {
gint c;
time_t t;