- info = g_slice_new0 (NotifyFilterInfo);
- info->self = g_object_ref (G_OBJECT (user_data));
- info->folder = tny_header_get_folder (header);
- priv->status_timeout = g_timeout_add_full (G_PRIORITY_DEFAULT, 1000,
- notify_filter_change,
- info,
- notify_filter_change_destroy);
+ if (header) {
+ NotifyFilterInfo *info;
+
+ info = g_slice_new0 (NotifyFilterInfo);
+ info->self = g_object_ref (G_OBJECT (user_data));
+ if (header)
+ info->folder = tny_header_get_folder (header);
+ priv->status_timeout = g_timeout_add_full (G_PRIORITY_DEFAULT, 1000,
+ notify_filter_change,
+ info,
+ notify_filter_change_destroy);
+ }