[evolution/wip/webkit2] EComposerPrivate - Critical warning when pasting empty clipboard content



commit 0b681a4b6b0f70cffd8e928be7e0cd0fbeffa5d8
Author: Tomas Popela <tpopela redhat com>
Date:   Thu Mar 3 13:28:20 2016 +0100

    EComposerPrivate - Critical warning when pasting empty clipboard content

 composer/e-composer-private.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c
index 4aec161..a33c3bd 100644
--- a/composer/e-composer-private.c
+++ b/composer/e-composer-private.c
@@ -519,7 +519,9 @@ e_composer_paste_html (EMsgComposer *composer,
        g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
        g_return_val_if_fail (GTK_IS_CLIPBOARD (clipboard), FALSE);
 
-       html = e_clipboard_wait_for_html (clipboard);
+       if (!(html = e_clipboard_wait_for_html (clipboard)))
+               return FALSE;
+
        g_return_val_if_fail (html != NULL, FALSE);
 
        editor = e_msg_composer_get_editor (composer);
@@ -622,8 +624,8 @@ e_composer_paste_text (EMsgComposer *composer,
        g_return_val_if_fail (E_IS_MSG_COMPOSER (composer), FALSE);
        g_return_val_if_fail (GTK_IS_CLIPBOARD (clipboard), FALSE);
 
-       text = gtk_clipboard_wait_for_text (clipboard);
-       g_return_val_if_fail (text != NULL, FALSE);
+       if (!(text = gtk_clipboard_wait_for_text (clipboard)))
+               return FALSE;
 
        editor = e_msg_composer_get_editor (composer);
        view = e_html_editor_get_view (editor);


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