[evolution] Fails to find nested message's attachment bar in WebKitWebView



commit 4e1c6dfb43bbb603c1d86ded646b74685fe13780
Author: Milan Crha <mcrha redhat com>
Date:   Fri Mar 6 11:24:24 2015 +0100

    Fails to find nested message's attachment bar in WebKitWebView
    
    A runtime warning like this:
    
       evolution-mail-WARNING **: Failed to find parent <object>
       for '.message.mixed.1.mbox.0.rfc822.attachment-bar' - no ID set?
    
    could be shown when a message in the preview had a message attachment,
    which had also an attachment.
    
    The reason for it was a use of the same variable name in the 'for' body
    as in the parent block, which, even the element was found, didn't set
    the parent block's variable, thus it behaved like nothing was found.

 mail/e-mail-display.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/mail/e-mail-display.c b/mail/e-mail-display.c
index 093e593..bd259af 100644
--- a/mail/e-mail-display.c
+++ b/mail/e-mail-display.c
@@ -332,7 +332,6 @@ find_element_by_id (WebKitDOMDocument *document,
        for (ii = 0; ii < length; ii++) {
                WebKitDOMHTMLIFrameElement *iframe;
                WebKitDOMDocument *frame_doc;
-               WebKitDOMElement *element;
 
                iframe = WEBKIT_DOM_HTML_IFRAME_ELEMENT (
                        webkit_dom_node_list_item (frames, ii));
@@ -343,9 +342,9 @@ find_element_by_id (WebKitDOMDocument *document,
 
                g_object_unref (iframe);
                if (element != NULL)
-                       goto out;
+                       break;
        }
- out:
+
        g_object_unref (frames);
 
        return element;
@@ -530,7 +529,7 @@ mail_display_plugin_widget_requested (WebKitWebView *web_view,
                /* This cannot be the last reference; thread-safety is assured,
                   because this runs in the main thread only. */
                g_object_unref (widget);
-               d (printf ("Handeled %s widget request from cache\n", part_id));
+               d (printf ("Handled %s widget request from cache\n", part_id));
                return widget;
        }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]