summaryrefslogtreecommitdiffstats
path: root/src/extension/implementation/script.cpp
diff options
context:
space:
mode:
authorMark Harmer <drivehappy@gmail.com>2015-04-27 16:01:19 +0000
committerJosh Andler <scislac@gmail.com>2015-04-27 16:01:19 +0000
commitf20da2a7a6e65bcf3a907c3ee5cb5fd69a71c867 (patch)
tree95b47df93c793689ec37e14384f82f7d21772774 /src/extension/implementation/script.cpp
parentextensions. ink2canvas.py - do not parse html comments. (Bug 1446204) (diff)
downloadinkscape-f20da2a7a6e65bcf3a907c3ee5cb5fd69a71c867.tar.gz
inkscape-f20da2a7a6e65bcf3a907c3ee5cb5fd69a71c867.zip
Mainloop fix for possible data loss if closing before save has completed.
Fixed bugs: - https://launchpad.net/bugs/967416 (bzr r14060)
Diffstat (limited to '')
-rw-r--r--src/extension/implementation/script.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/extension/implementation/script.cpp b/src/extension/implementation/script.cpp
index bbc567f75..52c360fcd 100644
--- a/src/extension/implementation/script.cpp
+++ b/src/extension/implementation/script.cpp
@@ -1027,7 +1027,10 @@ int Script::execute (const std::list<std::string> &in_command,
return 0;
}
- _main_loop = Glib::MainLoop::create(false);
+ // Create a new MainContext for the loop so that the original context sources are not run here,
+ // this enforces that only the file_listeners should be read in this new MainLoop
+ Glib::RefPtr<Glib::MainContext> _main_context = Glib::MainContext::create();
+ _main_loop = Glib::MainLoop::create(_main_context, false);
file_listener fileerr;
fileout.init(stdout_pipe, _main_loop);