commit a655a66c70cd50a6e8a858465572d042f03114f4
parent 025295135817d73d62ae9c4300f3b9eac81ae4b4
Author: LRN <lrn1986@gmail.com>
Date: Sun, 3 Feb 2013 17:17:43 +0000
Make plugins suicide after finishing to avoid error popups
Diffstat:
1 file changed, 7 insertions(+), 0 deletions(-)
diff --git a/src/main/extractor_plugin_main.c b/src/main/extractor_plugin_main.c
@@ -732,6 +732,13 @@ RundllEntryPoint (HWND hwnd,
EXTRACTOR_plugin_main_ (plugin, in, out);
close (in);
close (out);
+ /* libgobject may crash us hard if we LoadLibrary() it directly or
+ * indirectly, and then exit normally (causing FreeLibrary() to be
+ * called by the OS) or call FreeLibrary() on it directly or
+ * indirectly.
+ * By terminating here we alleviate that problem.
+ */
+ TerminateProcess (GetCurrentProcess (), 0);
}