summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/text-tool.cpp
diff options
context:
space:
mode:
authorJabiertxof <jabier.arraiza@marker.es>2019-09-16 15:44:15 +0000
committerJabiertxof <jabier.arraiza@marker.es>2019-09-16 15:44:15 +0000
commitbeec5ad0507551e535149f570753f62584532ed8 (patch)
tree7bfa085dc9084b39b4d6a66ccc137f4efbef751d /src/ui/tools/text-tool.cpp
parentAllow paste preserving new lines into a flowtext element (diff)
downloadinkscape-beec5ad0507551e535149f570753f62584532ed8.tar.gz
inkscape-beec5ad0507551e535149f570753f62584532ed8.zip
Avoid crash when clipboard is pastred twice with the all content of the text input
Diffstat (limited to 'src/ui/tools/text-tool.cpp')
-rw-r--r--src/ui/tools/text-tool.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/ui/tools/text-tool.cpp b/src/ui/tools/text-tool.cpp
index 5919d7fb2..41eda88d0 100644
--- a/src/ui/tools/text-tool.cpp
+++ b/src/ui/tools/text-tool.cpp
@@ -1312,7 +1312,6 @@ bool sp_text_paste_inline(ToolBase *ec)
{
if (!SP_IS_TEXT_CONTEXT(ec))
return false;
-
TextTool *tc = SP_TEXT_CONTEXT(ec);
if ((tc->text) || (tc->nascent_object)) {
@@ -1385,7 +1384,12 @@ bool sp_text_paste_inline(ToolBase *ec)
_("Paste text"));
return true;
+ } else {
+ // TODO: look why "wait_for_text()" sometimes return empty string
+ // I notice coping all text content and pasting twice
+ return true; //clip test is empty, so we return true to avoid further processing and crashes
}
+
} // FIXME: else create and select a new object under cursor!
return false;