aboutsummaryrefslogtreecommitdiff
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
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
-rw-r--r--ChangeLog5
-rw-r--r--ChangeLog.ja5
-rw-r--r--src/imageview.c4
3 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 179fa386..eaa85a70 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-06-27
+
+ * src/imageview.c: fixed a possible crash on the view change from
+ imageview to textview (thanks to NINOMIYA Yuuki).
+
2005-06-24
* src/ssl.c: show verify result as string.
diff --git a/ChangeLog.ja b/ChangeLog.ja
index 26462a54..decac54d 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,3 +1,8 @@
+2005-06-27
+
+ * src/imageview.c: イメージビューからテキストビューに切り替えるとき
+ にクラッシュする可能性があったのを修正(二之宮さん thanks)。
+
2005-06-24
* src/ssl.c: 検証結果を文字列として表示。
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;
}