[evolution/wip/webkit2] Crash when viewing meeting invitation mail
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit2] Crash when viewing meeting invitation mail
- Date: Tue, 29 Mar 2016 16:49:36 +0000 (UTC)
commit 7ba759b2451d0fb67fd7e2a3ac80de66bfe4e2c9
Author: Milan Crha <mcrha redhat com>
Date: Tue Mar 29 18:47:05 2016 +0200
Crash when viewing meeting invitation mail
a) There is no 'select' variable in module_itip_formatter_dom_utils_select_set_selected(),
it was renamed to 'element'
b) itip_view_ref_source() could return uninitialized variable 'source'
modules/itip-formatter/e-mail-part-itip.c | 2 +-
modules/itip-formatter/itip-view.c | 18 ++++++++++++------
.../module-itip-formatter-dom-utils.c | 4 ++--
3 files changed, 15 insertions(+), 9 deletions(-)
---
diff --git a/modules/itip-formatter/e-mail-part-itip.c b/modules/itip-formatter/e-mail-part-itip.c
index 18330e8..f502a9e 100644
--- a/modules/itip-formatter/e-mail-part-itip.c
+++ b/modules/itip-formatter/e-mail-part-itip.c
@@ -96,7 +96,7 @@ mail_part_itip_bind_dom_element (EMailPart *part,
document = webkit_dom_html_iframe_element_get_content_document (
WEBKIT_DOM_HTML_IFRAME_ELEMENT (element));
#endif
- itip_view_new (pitip, pitip->client_cache, element_id, page_id);
+ pitip->view = itip_view_new (pitip, pitip->client_cache, element_id, page_id);
}
static void
diff --git a/modules/itip-formatter/itip-view.c b/modules/itip-formatter/itip-view.c
index 1a3a4c6..c87b578 100644
--- a/modules/itip-formatter/itip-view.c
+++ b/modules/itip-formatter/itip-view.c
@@ -939,10 +939,12 @@ source_changed_cb (ItipView *view)
source = itip_view_ref_source (view);
- d (printf ("Source changed to '%s'\n", e_source_get_display_name (source)));
- g_signal_emit (view, signals[SOURCE_SELECTED], 0, source);
+ if (source) {
+ d (printf ("Source changed to '%s'\n", e_source_get_display_name (source)));
+ g_signal_emit (view, signals[SOURCE_SELECTED], 0, source);
- g_object_unref (source);
+ g_object_unref (source);
+ }
}
static void
@@ -952,8 +954,12 @@ source_changed_cb_signal_cb (GDBusConnection *connection,
const gchar *interface_name,
const gchar *signal_name,
GVariant *parameters,
- ItipView *view)
+ gpointer user_data)
{
+ ItipView *view = user_data;
+
+ g_return_if_fail (ITIP_IS_VIEW (view));
+
if (g_strcmp0 (signal_name, "SourceChanged") != 0)
return;
@@ -1786,7 +1792,7 @@ web_extension_proxy_created_cb (GDBusProxy *proxy,
MODULE_ITIP_FORMATTER_WEB_EXTENSION_OBJECT_PATH,
NULL,
G_DBUS_SIGNAL_FLAGS_NONE,
- (GDBusSignalCallback) source_changed_cb_signal_cb,
+ source_changed_cb_signal_cb,
view,
NULL);
@@ -2617,7 +2623,7 @@ itip_view_set_source (ItipView *view,
ESource *
itip_view_ref_source (ItipView *view)
{
- ESource *source;
+ ESource *source = NULL;
gboolean disable = FALSE, enabled = FALSE;
GVariant *result;
diff --git a/modules/itip-formatter/web-extension/module-itip-formatter-dom-utils.c
b/modules/itip-formatter/web-extension/module-itip-formatter-dom-utils.c
index 7c11aaf..cfea208 100644
--- a/modules/itip-formatter/web-extension/module-itip-formatter-dom-utils.c
+++ b/modules/itip-formatter/web-extension/module-itip-formatter-dom-utils.c
@@ -531,14 +531,14 @@ module_itip_formatter_dom_utils_select_set_selected (WebKitDOMDocument *document
return;
length = webkit_dom_html_select_element_get_length (
- WEBKIT_DOM_HTML_SELECT_ELEMENT (select));
+ WEBKIT_DOM_HTML_SELECT_ELEMENT (element));
for (ii = 0; ii < length; ii++) {
WebKitDOMNode *node;
WebKitDOMHTMLOptionElement *option_element;
gchar *value;
node = webkit_dom_html_select_element_item (
- WEBKIT_DOM_HTML_SELECT_ELEMENT (select), ii);
+ WEBKIT_DOM_HTML_SELECT_ELEMENT (element), ii);
option_element = WEBKIT_DOM_HTML_OPTION_ELEMENT (node);
value = webkit_dom_html_option_element_get_value (option_element);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]