# HG changeset patch # User Stu Tomlinson # Date 1180800419 0 # Node ID a4c1e66620e31ce66b7acd03eac2a3849ebfa8d2 # Parent 8e20bb5640ed25a769059da66aab2bd5bc15e15b Fix a crash when trying to use XMPP console with no XMPP accounts connected diff -r 8e20bb5640ed -r a4c1e66620e3 pidgin/plugins/xmppconsole.c --- a/pidgin/plugins/xmppconsole.c Sat Jun 02 14:57:17 2007 +0000 +++ b/pidgin/plugins/xmppconsole.c Sat Jun 02 16:06:59 2007 +0000 @@ -183,16 +183,17 @@ char *text; gc = console->gc; - - prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl); - + + if (gc) + prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl); + buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(console->entry)); gtk_text_buffer_get_start_iter(buffer, &start); gtk_text_buffer_get_end_iter(buffer, &end); - + text = gtk_imhtml_get_text(GTK_IMHTML(console->entry), &start, &end); - - if (gc && prpl_info->convo_closed != NULL) + + if (prpl_info && prpl_info->send_raw != NULL) prpl_info->send_raw(gc, text, strlen(text)); g_free(text);