pidgin/plugins/xmppconsole.c

changeset 17529
5fd44f61d007
parent 16749
14a3fdc0aed7
child 18096
65a668fff099
equal deleted inserted replaced
17528:0144b1908343 17529:5fd44f61d007
181 PurpleConnection *gc = console->gc; 181 PurpleConnection *gc = console->gc;
182 GtkTextBuffer *buffer; 182 GtkTextBuffer *buffer;
183 char *text; 183 char *text;
184 184
185 gc = console->gc; 185 gc = console->gc;
186 186
187 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl); 187 if (gc)
188 188 prpl_info = PURPLE_PLUGIN_PROTOCOL_INFO(gc->prpl);
189
189 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(console->entry)); 190 buffer = gtk_text_view_get_buffer(GTK_TEXT_VIEW(console->entry));
190 gtk_text_buffer_get_start_iter(buffer, &start); 191 gtk_text_buffer_get_start_iter(buffer, &start);
191 gtk_text_buffer_get_end_iter(buffer, &end); 192 gtk_text_buffer_get_end_iter(buffer, &end);
192 193
193 text = gtk_imhtml_get_text(GTK_IMHTML(console->entry), &start, &end); 194 text = gtk_imhtml_get_text(GTK_IMHTML(console->entry), &start, &end);
194 195
195 if (gc && prpl_info->convo_closed != NULL) 196 if (prpl_info && prpl_info->send_raw != NULL)
196 prpl_info->send_raw(gc, text, strlen(text)); 197 prpl_info->send_raw(gc, text, strlen(text));
197 198
198 g_free(text); 199 g_free(text);
199 gtk_imhtml_clear(GTK_IMHTML(console->entry)); 200 gtk_imhtml_clear(GTK_IMHTML(console->entry));
200 } 201 }

mercurial