[evolution/wip/webkit-composer: 318/372] When the is no selection in composer don't try to process it.
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit-composer: 318/372] When the is no selection in composer don't try to process it.
- Date: Thu, 6 Feb 2014 11:50:14 +0000 (UTC)
commit 36821f5233c30026e679520aa3662166244c28bf
Author: Tomas Popela <tpopela redhat com>
Date: Fri Oct 11 13:51:58 2013 +0200
When the is no selection in composer don't try to process it.
e-util/e-editor-selection.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/e-util/e-editor-selection.c b/e-util/e-editor-selection.c
index 5342bf9..a7c97aa 100644
--- a/e-util/e-editor-selection.c
+++ b/e-util/e-editor-selection.c
@@ -123,12 +123,15 @@ editor_selection_get_current_range (EEditorSelection *selection)
goto exit;
dom_selection = webkit_dom_dom_window_get_selection (window);
+ if (!WEBKIT_DOM_IS_DOM_SELECTION (dom_selection))
+ goto exit;
+
if (webkit_dom_dom_selection_get_range_count (dom_selection) < 1)
goto exit;
range = webkit_dom_dom_selection_get_range_at (dom_selection, 0, NULL);
-exit:
+ exit:
g_object_unref (editor_widget);
return range;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]