aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/pcs
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2002-08-09 01:14:02 +0800
committerDan Winship <danw@src.gnome.org>2002-08-09 01:14:02 +0800
commitaab9b5cce1eece7cfc7c17057f3fa632982fa44e (patch)
tree067bfe7483472328221dc7dc98c7225a4feedc55 /calendar/pcs
parent107a638a25358ffa10a1634ed5baa4bd547a8410 (diff)
downloadgsoc2013-evolution-aab9b5cce1eece7cfc7c17057f3fa632982fa44e.tar
gsoc2013-evolution-aab9b5cce1eece7cfc7c17057f3fa632982fa44e.tar.gz
gsoc2013-evolution-aab9b5cce1eece7cfc7c17057f3fa632982fa44e.tar.bz2
gsoc2013-evolution-aab9b5cce1eece7cfc7c17057f3fa632982fa44e.tar.lz
gsoc2013-evolution-aab9b5cce1eece7cfc7c17057f3fa632982fa44e.tar.xz
gsoc2013-evolution-aab9b5cce1eece7cfc7c17057f3fa632982fa44e.tar.zst
gsoc2013-evolution-aab9b5cce1eece7cfc7c17057f3fa632982fa44e.zip
Initialize loaded_backends before using it. (Just kills off a harmless
* pcs/query-backend.c (query_backend_new): Initialize loaded_backends before using it. (Just kills off a harmless g_warning.) svn path=/trunk/; revision=17745
Diffstat (limited to 'calendar/pcs')
-rw-r--r--calendar/pcs/query-backend.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/calendar/pcs/query-backend.c b/calendar/pcs/query-backend.c
index 651138fa03..3757a14076 100644
--- a/calendar/pcs/query-backend.c
+++ b/calendar/pcs/query-backend.c
@@ -260,6 +260,9 @@ query_backend_new (Query *query, CalBackend *backend)
g_return_val_if_fail (IS_QUERY (query), NULL);
g_return_val_if_fail (IS_CAL_BACKEND (backend), NULL);
+ if (!loaded_backends)
+ loaded_backends = g_hash_table_new (g_str_hash, g_str_equal);
+
/* see if we already have the backend loaded */
qb = g_hash_table_lookup (loaded_backends,
cal_backend_get_uri (backend));
@@ -283,8 +286,6 @@ query_backend_new (Query *query, CalBackend *backend)
gtk_signal_connect (GTK_OBJECT (backend), "obj_removed",
GTK_SIGNAL_FUNC (object_removed_cb), qb);
- if (!loaded_backends)
- loaded_backends = g_hash_table_new (g_str_hash, g_str_equal);
g_hash_table_insert (loaded_backends, qb->priv->uri, qb);
}