Mercurial > pidgin.yaz
changeset 11458:4db38b374d3f
[gaim-migrate @ 13697]
Fixing a couple assertion failures I caused a long time ago.
committer: Tailor Script <tailor@pidgin.im>
author | Richard Laager <rlaager@wiktel.com> |
---|---|
date | Tue, 06 Sep 2005 04:38:02 +0000 |
parents | 4d9686e7c234 |
children | b8f6f1fd30c0 |
files | src/gtkrequest.c src/log.c |
diffstat | 2 files changed, 12 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/src/gtkrequest.c Tue Sep 06 03:38:13 2005 +0000 +++ b/src/gtkrequest.c Tue Sep 06 04:38:02 2005 +0000 @@ -730,16 +730,18 @@ #ifdef NEW_STYLE_COMPLETION static gboolean screenname_completion_match_func(GtkEntryCompletion *completion, - const gchar *key, GtkTreeIter *iter, gpointer user_data) { - + const gchar *key, GtkTreeIter *iter, gpointer user_data) +{ + GtkTreeModel *model; GValue val1 = { 0, }; GValue val2 = { 0, }; - GtkTreeModel *model; + const char *tmp; model = gtk_entry_completion_get_model (completion); gtk_tree_model_get_value(model, iter, 2, &val1); - if (g_str_has_prefix(g_value_get_string(&val1), key)) + tmp = g_value_get_string(&val1); + if (tmp != NULL && g_str_has_prefix(tmp, key)) { g_value_unset(&val1); return TRUE; @@ -747,7 +749,8 @@ g_value_unset(&val1); gtk_tree_model_get_value(model, iter, 3, &val2); - if (g_str_has_prefix(g_value_get_string(&val2), key)) + tmp = g_value_get_string(&val2); + if (tmp != NULL && g_str_has_prefix(tmp, key)) { g_value_unset(&val2); return TRUE; @@ -758,8 +761,8 @@ } static gboolean screenname_completion_match_selected_cb(GtkEntryCompletion *completion, - GtkTreeModel *model, GtkTreeIter *iter, gpointer *user_data) { - + GtkTreeModel *model, GtkTreeIter *iter, gpointer *user_data) +{ GValue val = { 0, }; GaimRequestField *screen_field = user_data[1]; GList *fields = screen_field->group->fields;
--- a/src/log.c Tue Sep 06 03:38:13 2005 +0000 +++ b/src/log.c Tue Sep 06 04:38:02 2005 +0000 @@ -649,7 +649,8 @@ } /* Determine if this (account, name) combination exists as a buddy. */ - set->buddy = (gaim_find_buddy(account, name) != NULL); + if (account != NULL) + set->buddy = (gaim_find_buddy(account, name) != NULL); log_add_log_set_to_hash(sets, set); }