aboutsummaryrefslogtreecommitdiff
path: root/src/imageview.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-06-27 07:58:56 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2005-06-27 07:58:56 +0000
commit64b14ff62a62cd102ad8806c60ee56cb1e52b934 (patch)
tree4f2dab3b9524162228f3f1a628dcc6c901f0aa56 /src/imageview.c
parent7272629d117959d8fde493a3499bda4aea40448c (diff)
fixed a possible crash on the view change from imageview to textview.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@379 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'src/imageview.c')
-rw-r--r--src/imageview.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/imageview.c b/src/imageview.c
index bbe14c9e..312794f7 100644
--- a/src/imageview.c
+++ b/src/imageview.c
@@ -89,6 +89,8 @@ void imageview_show_image(ImageView *imageview, MimeInfo *mimeinfo,
GError *error = NULL;
g_return_if_fail(imageview != NULL);
+ g_return_if_fail(imageview->scrolledwin != NULL);
+ g_return_if_fail(imageview->scrolledwin->parent != NULL);
if (file) {
imageview_clear(imageview);
@@ -242,6 +244,8 @@ static void size_allocate_cb(GtkWidget *widget,GtkAllocation *allocation,
imageview->resizing = FALSE;
return;
}
+ if (!imageview->scrolledwin->parent)
+ return;
imageview_show_image(imageview, NULL, NULL, TRUE);
imageview->resizing = TRUE;
}