[anjal] BUGFIX: Moblin Bugzilla #4032 - Crash while closing message rendering
- From: Srinivasa Ragavan <sragavan src gnome org>
- To: svn-commits-list gnome org
- Subject: [anjal] BUGFIX: Moblin Bugzilla #4032 - Crash while closing message rendering
- Date: Mon, 20 Jul 2009 07:08:35 +0000 (UTC)
commit 76e151e506ed1cf189d578883811a040bb4a3727
Author: Srinivasa Ragavan <sragavan novell com>
Date: Mon Jul 20 12:35:51 2009 +0530
BUGFIX: Moblin Bugzilla #4032 - Crash while closing message rendering
src/em-webkit-stream.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/src/em-webkit-stream.c b/src/em-webkit-stream.c
index 0e36c02..01f5b21 100644
--- a/src/em-webkit-stream.c
+++ b/src/em-webkit-stream.c
@@ -114,12 +114,18 @@ static int
emws_sync_close(CamelStream *stream)
{
EMWebKitStream *emws = (EMWebKitStream *)stream;
- if (webkit_web_frame_get_height(webkit_web_view_get_main_frame(emws->view)))
+ if (emws->view && webkit_web_frame_get_height(webkit_web_view_get_main_frame(emws->view)))
gtk_widget_set_size_request ((GtkWidget *)emws->view, -1, webkit_web_frame_get_height(webkit_web_view_get_main_frame(emws->view)));
return 0;
}
+static void
+emws_weak_notify (EMWebKitStream *emws, GObject *view)
+{
+ emws->view = NULL;
+}
+
CamelStream *
em_webkit_stream_new(WebKitWebView *view, GtkWidget *body)
{
@@ -132,6 +138,8 @@ em_webkit_stream_new(WebKitWebView *view, GtkWidget *body)
new->body = body;
em_sync_stream_set_buffer_size(&new->sync, 8192);
+ g_object_weak_ref (view, emws_weak_notify, new);
+
return (CamelStream *)new;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]