Fixed a couple of G_CRITICALs
authorSergio Villar Senín <svillar@igalia.com>
Mon, 25 Jan 2010 11:47:26 +0000 (12:47 +0100)
committerSergio Villar Senín <svillar@igalia.com>
Mon, 25 Jan 2010 11:47:26 +0000 (12:47 +0100)
src/hildon2/modest-platform.c
src/widgets/modest-gtkhtml-msg-view.c

index b054cf4..8c787e0 100644 (file)
@@ -1748,11 +1748,13 @@ modest_platform_remove_new_mail_notifications (gboolean only_visuals, const gcha
         }
 
        /* Save the ids */
         }
 
        /* Save the ids */
-       modest_account_mgr_set_list (modest_runtime_get_account_mgr (), acc_name,
-                                    MODEST_ACCOUNT_NOTIFICATION_IDS,
-                                    notif_list, MODEST_CONF_VALUE_INT, FALSE);
+       if (notif_list) {
+               modest_account_mgr_set_list (modest_runtime_get_account_mgr (), acc_name,
+                                            MODEST_ACCOUNT_NOTIFICATION_IDS,
+                                            notif_list, MODEST_CONF_VALUE_INT, FALSE);
 
 
-       g_slist_free (notif_list);
+               g_slist_free (notif_list);
+       }
 
 #endif /* MODEST_HAVE_HILDON_NOTIFY */
 }
 
 #endif /* MODEST_HAVE_HILDON_NOTIFY */
 }
index 8caac8f..95e847d 100644 (file)
@@ -2839,8 +2839,7 @@ set_calendar (ModestGtkhtmlMsgView *self, TnyHeader *header, TnyMsg *msg)
                gtk_widget_hide_all (priv->calendar_box);
                gtk_widget_hide (priv->calendar_actions_container);
                gtk_widget_hide_all (priv->calendar_actions_container);
                gtk_widget_hide_all (priv->calendar_box);
                gtk_widget_hide (priv->calendar_actions_container);
                gtk_widget_hide_all (priv->calendar_actions_container);
-               gtk_widget_hide (priv->calendar_actions_box);
+               if (priv->calendar_actions_box)
+                       gtk_widget_hide (priv->calendar_actions_box);
        }
        }
-       
-
 }
 }