comparison src/gtkimhtml.c @ 6839:bdc4e73f354d

[gaim-migrate @ 7384] Fixed a smiley crash. Thanks javabsp. committer: Tailor Script <tailor@pidgin.im>
author Christian Hammond <chipx86@chipx86.com>
date Sun, 14 Sep 2003 21:08:56 +0000
parents 782907a6ae65
children 4f8258b2bb8d
comparison
equal deleted inserted replaced
6838:551a8111977a 6839:bdc4e73f354d
1383 } 1383 }
1384 NEW_BIT (NEW_TEXT_BIT); 1384 NEW_BIT (NEW_TEXT_BIT);
1385 wpos = g_snprintf (ws, smilelen + 1, "%s", c); 1385 wpos = g_snprintf (ws, smilelen + 1, "%s", c);
1386 anchor = gtk_text_buffer_create_child_anchor(imhtml->text_buffer, &iter); 1386 anchor = gtk_text_buffer_create_child_anchor(imhtml->text_buffer, &iter);
1387 pixbuf = gtk_smiley_tree_image(imhtml, sml, ws); 1387 pixbuf = gtk_smiley_tree_image(imhtml, sml, ws);
1388 icon = gtk_image_new_from_animation(pixbuf); 1388 if(pixbuf){
1389 g_object_unref(pixbuf); 1389 icon = gtk_image_new_from_animation(pixbuf);
1390 gtk_widget_show(icon); 1390 gtk_widget_show(icon);
1391 gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(imhtml), icon, anchor); 1391 gtk_text_view_add_child_at_anchor(GTK_TEXT_VIEW(imhtml), icon, anchor);
1392 }
1392 1393
1393 c += smilelen; 1394 c += smilelen;
1394 pos += smilelen; 1395 pos += smilelen;
1395 wpos = 0; 1396 wpos = 0;
1396 ws[0] = 0; 1397 ws[0] = 0;