From: Luke S. <lsc...@us...> - 2004-03-01 18:12:32
|
Update of /cvsroot/gaim/gaim/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29123/src Modified Files: gtkroomlist.c Log Message: " This is xgrimx's patch to fix a crash if you click the join button twice without changing the selection in the room list dialog. He had me take a look at it and I did and it fixes the problem." --marv Index: gtkroomlist.c =================================================================== RCS file: /cvsroot/gaim/gaim/src/gtkroomlist.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -p -r1.7 -r1.8 --- gtkroomlist.c 27 Feb 2004 01:48:10 -0000 1.7 +++ gtkroomlist.c 1 Mar 2004 18:01:11 -0000 1.8 @@ -156,6 +156,11 @@ struct _menu_cb_info { }; static void +join_button_data_change_cb(gpointer data) { + g_free(data); +} + +static void selection_changed_cb(GtkTreeSelection *selection, GaimGtkRoomlist *grl) { GtkTreeIter iter; GValue val = { 0, }; @@ -177,7 +182,8 @@ selection_changed_cb(GtkTreeSelection *s info->list = dialog->roomlist; info->room = room; - g_object_set_data(G_OBJECT(dialog->join_button), "room-info", info); + g_object_set_data_full(G_OBJECT(dialog->join_button), "room-info", + info, join_button_data_change_cb); gtk_widget_set_sensitive(dialog->join_button, TRUE); } else { @@ -198,8 +204,8 @@ static void join_button_cb(GtkButton *bu info = (struct _menu_cb_info*)g_object_get_data(G_OBJECT(button), "room-info"); - do_join_cb(grl->tree, info); - g_free(info); + if(info != NULL) + do_join_cb(grl->tree, info); } static void row_activated_cb(GtkTreeView *tv, GtkTreePath *path, GtkTreeViewColumn *arg2, |