[evolution-data-server] store_get_inbox_folder_sync: Add a NULL check.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] store_get_inbox_folder_sync: Add a NULL check.
- Date: Wed, 25 Jan 2012 15:46:06 +0000 (UTC)
commit d559cb488a1a0120c398840ce5c04f113148334a
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Jan 25 10:43:40 2012 -0500
store_get_inbox_folder_sync: Add a NULL check.
Verify the get_folder_sync() method is implemented before invoking it.
camel/camel-store.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/camel/camel-store.c b/camel/camel-store.c
index c2529c3..be38c1c 100644
--- a/camel/camel-store.c
+++ b/camel/camel-store.c
@@ -302,8 +302,10 @@ store_get_inbox_folder_sync (CamelStore *store,
CamelStoreClass *class;
CamelFolder *folder;
- /* Assume the inbox's name is "inbox" and open with default flags. */
class = CAMEL_STORE_GET_CLASS (store);
+ g_return_val_if_fail (class->get_folder_sync != NULL, NULL);
+
+ /* Assume the inbox's name is "inbox" and open with default flags. */
folder = class->get_folder_sync (store, "inbox", 0, cancellable, error);
CAMEL_CHECK_GERROR (store, get_folder_sync, folder != NULL, error);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]