[anjal] Fix a crasher.
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: svn-commits-list gnome org
- Subject: [anjal] Fix a crasher.
- Date: Thu, 23 Jul 2009 18:53:08 +0000 (UTC)
commit 5f4f731783a3328d096ba3f982e6c1dc9975edac
Author: Srinivasa Ragavan <sragavan novell com>
Date: Fri Jul 24 00:21:26 2009 +0530
Fix a crasher.
src/em-format-mail-display.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/em-format-mail-display.c b/src/em-format-mail-display.c
index 1921cad..c974949 100644
--- a/src/em-format-mail-display.c
+++ b/src/em-format-mail-display.c
@@ -1549,6 +1549,9 @@ efhd_attachment_button(EMFormatMail *efh, GtkWidget *eb, EMFormatMailPObject *po
gpointer parent = NULL;
char *txt;
+ if (!eb || !GTK_IS_WIDGET(eb))
+ return NULL;
+
/* FIXME: handle default shown case */
d(printf("adding attachment button/content\n"));
@@ -1566,7 +1569,7 @@ efhd_attachment_button(EMFormatMail *efh, GtkWidget *eb, EMFormatMailPObject *po
e_attachment_set_can_show (attachment, info->handle != NULL);
parent = gtk_widget_get_toplevel (GTK_WIDGET (eb));
- parent = GTK_WIDGET_TOPLEVEL (parent) ? parent : NULL;
+ parent = (parent && GTK_WIDGET_TOPLEVEL (parent)) ? parent : NULL;
view = E_ATTACHMENT_VIEW (efhd->priv->attachment_view);
gtk_widget_show (efhd->priv->attachment_view);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]