[empathy] individual-menu: allow priv->store to be NULL
- From: Guillaume Desmottes <gdesmott src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [empathy] individual-menu: allow priv->store to be NULL
- Date: Wed, 14 Dec 2011 12:24:32 +0000 (UTC)
commit 27de0b98c6433d56b7dd4112817c49a1bca7ddce
Author: Guillaume Desmottes <guillaume desmottes collabora co uk>
Date: Mon Nov 28 14:07:27 2011 +0100
individual-menu: allow priv->store to be NULL
We already checks if it's a IndividualStoreChannel before using it so that's
safe.
https://bugzilla.gnome.org/show_bug.cgi?id=665038
libempathy-gtk/empathy-individual-menu.c | 5 +++--
1 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/libempathy-gtk/empathy-individual-menu.c b/libempathy-gtk/empathy-individual-menu.c
index e19fde3..2882a9e 100644
--- a/libempathy-gtk/empathy-individual-menu.c
+++ b/libempathy-gtk/empathy-individual-menu.c
@@ -60,7 +60,7 @@
typedef struct {
FolksIndividual *individual; /* owned */
EmpathyIndividualFeatureFlags features;
- EmpathyIndividualStore *store;
+ EmpathyIndividualStore *store; /* may be NULL */
} EmpathyIndividualMenuPriv;
enum {
@@ -705,7 +705,8 @@ empathy_individual_menu_new (FolksIndividual *individual,
EmpathyIndividualStore *store)
{
g_return_val_if_fail (FOLKS_IS_INDIVIDUAL (individual), NULL);
- g_return_val_if_fail (EMPATHY_IS_INDIVIDUAL_STORE (store), NULL);
+ g_return_val_if_fail (store == NULL ||
+ EMPATHY_IS_INDIVIDUAL_STORE (store), NULL);
g_return_val_if_fail (features != EMPATHY_INDIVIDUAL_FEATURE_NONE, NULL);
return g_object_new (EMPATHY_TYPE_INDIVIDUAL_MENU,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]