diff options
author | Ted Gould <ted@canonical.com> | 2009-09-09 11:42:40 -0500 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-09-09 11:42:40 -0500 |
commit | 83d7d67d01553c88e17568d918f6bf1da50262a2 (patch) | |
tree | b9e8f0393c463ff03f4654d8dc48580268b32aca /src/messages-service.c | |
parent | 0ff6a4d2393c1f56200bd5ca4e5f6f493cadec02 (diff) | |
download | ayatana-indicator-messages-83d7d67d01553c88e17568d918f6bf1da50262a2.tar.gz ayatana-indicator-messages-83d7d67d01553c88e17568d918f6bf1da50262a2.tar.bz2 ayatana-indicator-messages-83d7d67d01553c88e17568d918f6bf1da50262a2.zip |
Forgot to initialize a separator. Also initializing the locally defined server objects to make it easier to find bugs with not setting stuff.
Diffstat (limited to 'src/messages-service.c')
-rw-r--r-- | src/messages-service.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/messages-service.c b/src/messages-service.c index 29eaca3..73da691 100644 --- a/src/messages-service.c +++ b/src/messages-service.c @@ -590,7 +590,7 @@ static void server_removed (IndicateListener * listener, IndicateListenerServer * server, gchar * type, gpointer data) { g_debug("Removing server: %s", INDICATE_LISTENER_SERVER_DBUS_NAME(server)); - serverList_t slt; + serverList_t slt = {0}; slt.server = server; GList * lookup = g_list_find_custom(serverList, &slt, serverList_equal); @@ -755,7 +755,7 @@ indicator_added (IndicateListener * listener, IndicateListenerServer * server, I /* Looking for a server entry to attach this indicator to. If we can't find one then we have to build one and attach the indicator to it. */ - serverList_t sl_item_local; + serverList_t sl_item_local = {0}; serverList_t * sl_item = NULL; sl_item_local.server = server; GList * serverentry = g_list_find_custom(serverList, &sl_item_local, serverList_equal); @@ -769,6 +769,7 @@ indicator_added (IndicateListener * listener, IndicateListenerServer * server, I sl_item->imList = NULL; sl_item->attention = FALSE; sl_item->count = 0; + sl_item->separator = NULL; serverList = g_list_insert_sorted(serverList, sl_item, serverList_sort); } else { @@ -823,7 +824,7 @@ indicator_removed (IndicateListener * listener, IndicateListenerServer * server, gboolean removed = FALSE; /* Find the server that was related to this item */ - serverList_t sl_item_local; + serverList_t sl_item_local = {0}; serverList_t * sl_item = NULL; sl_item_local.server = server; GList * serverentry = g_list_find_custom(serverList, &sl_item_local, serverList_equal); |