From 0d5eae5a731eb70b24874a9aaf773800190f355d Mon Sep 17 00:00:00 2001 From: Sergio Villar Senin Date: Thu, 17 Jan 2008 09:15:28 +0000 Subject: [PATCH] * Fixes a potential SIGSEV pmo-trunk-r4055 --- src/maemo/modest-platform.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/maemo/modest-platform.c b/src/maemo/modest-platform.c index a41e3ce..3ff9177 100644 --- a/src/maemo/modest-platform.c +++ b/src/maemo/modest-platform.c @@ -1348,12 +1348,13 @@ modest_platform_on_new_headers_received (TnyList *header_list, NULL); if (!show_visual) { - gboolean screen_on, app_in_foreground; + gboolean screen_on = TRUE, app_in_foreground; ModestWindow *main_window; /* Get the screen status */ main_window = modest_window_mgr_get_main_window (modest_runtime_get_window_mgr (), FALSE); - screen_on = modest_main_window_screen_is_on (MODEST_MAIN_WINDOW (main_window)); + if (main_window) + screen_on = modest_main_window_screen_is_on (MODEST_MAIN_WINDOW (main_window)); /* Get the window status */ app_in_foreground = hildon_program_get_is_topmost (hildon_program_get_instance ()); -- 1.7.9.5