diff options
| author | Ralf Stephan <ralf@ark.in-berlin.de> | 2006-05-29 08:34:57 +0000 |
|---|---|---|
| committer | rwst <rwst@users.sourceforge.net> | 2006-05-29 08:34:57 +0000 |
| commit | 90dd89530831586fc00d223e957f1990004abee9 (patch) | |
| tree | eee428603cee4285425ffdc7481c8ee6016963de /src | |
| parent | use unions for type-punning to remove some gcc-4.1 warnings (diff) | |
| download | inkscape-90dd89530831586fc00d223e957f1990004abee9.tar.gz inkscape-90dd89530831586fc00d223e957f1990004abee9.zip | |
handle request for not-compiled-in internal scripting; execute didn't check return value; fixes #1495283
(bzr r1062)
Diffstat (limited to 'src')
| -rw-r--r-- | src/extension/script/InkscapeScript.cpp | 6 | ||||
| -rw-r--r-- | src/ui/dialog/scriptdialog.cpp | 8 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/extension/script/InkscapeScript.cpp b/src/extension/script/InkscapeScript.cpp index 87d120245..f403a3db0 100644 --- a/src/extension/script/InkscapeScript.cpp +++ b/src/extension/script/InkscapeScript.cpp @@ -66,6 +66,9 @@ bool InkscapeScript::interpretScript(const Glib::ustring &script, #ifdef WITH_PERL langname="Perl"; interp = new InkscapePerl(); +#else + g_print ("Internal Perl script functionality requested, but it was not compiled in!\n"); + return false; #endif } else if (language == InkscapeScript::PYTHON) @@ -73,6 +76,9 @@ bool InkscapeScript::interpretScript(const Glib::ustring &script, #ifdef WITH_PYTHON langname="Python"; interp = new InkscapePython(); +#else + g_print ("Internal Python script functionality requested, but it was not compiled in!\n"); + return false; #endif } else diff --git a/src/ui/dialog/scriptdialog.cpp b/src/ui/dialog/scriptdialog.cpp index a0f7f4337..483677464 100644 --- a/src/ui/dialog/scriptdialog.cpp +++ b/src/ui/dialog/scriptdialog.cpp @@ -1,9 +1,4 @@ /* - * This dialog is for launching scripts whose main purpose if - * the scripting of Inkscape itself. - * - * Authors: - * Bob Jamison * Other dudes from The Inkscape Organization * * Copyright (C) 2004, 2005 Authors @@ -146,7 +141,8 @@ lang) Glib::ustring output; Glib::ustring error; Inkscape::Extension::Script::InkscapeScript engine; - engine.interpretScript(script, output, error, lang); + bool ok = engine.interpretScript(script, output, error, lang); + if (!ok) return; outputText.get_buffer()->set_text(output); errorText.get_buffer()->set_text(error); } |
