From 4890b8cf3142282b5a3fdd63b71dc660dca5ef5b Mon Sep 17 00:00:00 2001 From: Kjartan Maraas Date: Mon, 12 Feb 2007 09:15:15 +0000 Subject: Add NULL check before calling strcmp(). Fixes a crash reported in bug 2007-02-12 Kjartan Maraas * em-folder-browser.c: (emfb_search_search_activated): Add NULL check before calling strcmp(). Fixes a crash reported in bug #382155. svn path=/trunk/; revision=33204 --- mail/ChangeLog | 6 ++++++ mail/em-folder-browser.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index f6139a86ef..8322bec8be 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2007-02-12 Kjartan Maraas + + * em-folder-browser.c: (emfb_search_search_activated): + Add NULL check before calling strcmp(). Fixes a crash + reported in bug #382155. + 2007-02-12 Srinivasa Ragavan ** Print migration updates from Ebby Wiselyn diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c index c94baeb759..329af0b290 100644 --- a/mail/em-folder-browser.c +++ b/mail/em-folder-browser.c @@ -1057,7 +1057,7 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb) g_object_get (esb, "query", &search_word, NULL); - if (efb->all_account_search_vf && !strcmp (search_word, ((CamelVeeFolder *) efb->all_account_search_vf)->expression) ) { + if (search_word && efb->all_account_search_vf && !strcmp (search_word, ((CamelVeeFolder *) efb->all_account_search_vf)->expression) ) { /* No real search apart from the existing one */ break; } -- cgit