# HG changeset patch # User Daniel Atallah # Date 1233027131 0 # Node ID 3d456ca75ed91a66e70411f4a7b8d8f9de7305d2 # Parent a8db457c421a121e84f69e7800f4a409aaa6a823 Prevent a crash that can occur while copying the contents of the Debug Window. This ends up masking mismatched tags in the imhtml output, but that is better than a crash. Thanks to Danilo Piazzalunga for figuring out what was happening. Fixes #6089 diff -r a8db457c421a -r 3d456ca75ed9 pidgin/gtkimhtml.c --- a/pidgin/gtkimhtml.c Mon Jan 26 02:39:50 2009 +0000 +++ b/pidgin/gtkimhtml.c Tue Jan 27 03:32:11 2009 +0000 @@ -5378,12 +5378,14 @@ text_tag_data_destroy(tmp); } - if (tmp == NULL) - purple_debug_warning("gtkimhtml", "empty queue, more closing tags than open tags!\n"); - else { + if (tmp != NULL) { g_string_append(str, tmp->end); text_tag_data_destroy(tmp); } +#if 0 /* This can't be allowed to happen because it causes the iters to be invalidated in the debug window imhtml during text copying */ + else + purple_debug_warning("gtkimhtml", "empty queue, more closing tags than open tags!\n"); +#endif while ((tmp = g_queue_pop_head(r))) { g_string_append(str, tmp->start);