Fix crash pasting into editor (rhbz#1406510)
This commit is contained in:
parent
6176ee6bbe
commit
8f2bbfe89b
2 changed files with 63 additions and 1 deletions
|
|
@ -0,0 +1,57 @@
|
|||
From 960890f1babaed48216fc0e93871dc0fe9683a12 Mon Sep 17 00:00:00 2001
|
||||
From: Milan Crha <mcrha@redhat.com>
|
||||
Date: Wed, 21 Dec 2016 11:36:22 +0100
|
||||
Subject: [PATCH] Crash on paste of a vCard into a message composer body
|
||||
|
||||
This had been reported downstream as:
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1406510
|
||||
|
||||
Copying (right click Copy) a contact from the Contacts page and
|
||||
the trying to Paste into the body of a new email message, causes
|
||||
a crash in webkit_editor_paste_clipboard_targets_cb().
|
||||
---
|
||||
src/e-util/e-html-editor-actions.c | 3 +++
|
||||
src/modules/webkit-editor/e-webkit-editor.c | 5 ++++-
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/e-util/e-html-editor-actions.c b/src/e-util/e-html-editor-actions.c
|
||||
index f0649e6..9fb9b0f 100644
|
||||
--- a/src/e-util/e-html-editor-actions.c
|
||||
+++ b/src/e-util/e-html-editor-actions.c
|
||||
@@ -555,6 +555,9 @@ clipboard_text_received_for_paste_as_text (GtkClipboard *clipboard,
|
||||
{
|
||||
EContentEditor *cnt_editor;
|
||||
|
||||
+ if (!text || !*text)
|
||||
+ return;
|
||||
+
|
||||
cnt_editor = e_html_editor_get_content_editor (editor);
|
||||
e_content_editor_insert_content (
|
||||
cnt_editor,
|
||||
diff --git a/src/modules/webkit-editor/e-webkit-editor.c b/src/modules/webkit-editor/e-webkit-editor.c
|
||||
index 4dbd878..43cc223 100644
|
||||
--- a/src/modules/webkit-editor/e-webkit-editor.c
|
||||
+++ b/src/modules/webkit-editor/e-webkit-editor.c
|
||||
@@ -5665,6 +5665,7 @@ webkit_editor_paste_clipboard_targets_cb (GtkClipboard *clipboard,
|
||||
|
||||
webkit_editor_insert_image (E_CONTENT_EDITOR (wk_editor), uri);
|
||||
|
||||
+ g_free (content);
|
||||
g_free (uri);
|
||||
|
||||
return;
|
||||
@@ -5676,8 +5677,10 @@ webkit_editor_paste_clipboard_targets_cb (GtkClipboard *clipboard,
|
||||
/* Prefer plain text over HTML when in the plain text mode, but only
|
||||
* when pasting content from outside the editor view. */
|
||||
|
||||
- if (!content && !*content)
|
||||
+ if (!content || !*content) {
|
||||
+ g_free (content);
|
||||
return;
|
||||
+ }
|
||||
|
||||
if (is_html)
|
||||
webkit_editor_insert_content (
|
||||
--
|
||||
2.9.3
|
||||
|
||||
|
|
@ -30,7 +30,7 @@
|
|||
|
||||
Name: evolution
|
||||
Version: 3.22.3
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Group: Applications/Productivity
|
||||
Summary: Mail and calendar client for GNOME
|
||||
License: GPLv2+ and GFDL
|
||||
|
|
@ -46,6 +46,7 @@ Obsoletes: evolution-NetworkManager < %{last_evo_nm_version}
|
|||
|
||||
# RH bug #
|
||||
#Patch01: evolution-3.17.1-doc-e-cell-renderer-color.patch
|
||||
Patch0: 0001-Crash-on-paste-of-a-vCard-into-a-message-composer-bo.patch
|
||||
|
||||
## Dependencies ###
|
||||
|
||||
|
|
@ -203,6 +204,7 @@ the functionality of the installed %{name} package.
|
|||
%prep
|
||||
%setup -q -n evolution-%{version}
|
||||
#%patch01 -p1 -b .doc-e-cell-renderer-color
|
||||
%patch0 -p1 -b .composer-crash
|
||||
|
||||
# Remove the welcome email from Novell
|
||||
for inbox in mail/default/*/Inbox; do
|
||||
|
|
@ -527,6 +529,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||
%{_datadir}/installed-tests
|
||||
|
||||
%changelog
|
||||
* Wed Jan 11 2017 Dan Williams <dcbw@redhat.com> - 3.22.3-2
|
||||
- Fix crash pasting into editor (rhbz#1406510)
|
||||
|
||||
* Mon Dec 12 2016 Milan Crha <mcrha@redhat.com> - 3.22.3-1
|
||||
- Update to 3.22.3
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue