[gimp] app/tests: Exit properly in test-core.c to avoid broken wire



commit 81410e0a5fe6564995e082e71d817ed9fc7cc08c
Author: Martin Nordholts <martinn src gnome org>
Date:   Thu Oct 21 21:09:16 2010 +0200

    app/tests: Exit properly in test-core.c to avoid broken wire
    
    Exit properly in test-core.c to avoid broken wire causing the warning:
    
      LibGimpBase-WARNING **: script-fu: gimp_wire_read(): error

 app/tests/test-core.c |   11 +++++++++--
 1 files changed, 9 insertions(+), 2 deletions(-)
---
diff --git a/app/tests/test-core.c b/app/tests/test-core.c
index f5b1b87..acff623 100644
--- a/app/tests/test-core.c
+++ b/app/tests/test-core.c
@@ -178,6 +178,8 @@ int
 main (int    argc,
       char **argv)
 {
+  int result;
+
   g_thread_init (NULL);
   g_type_init ();
   g_test_init (&argc, &argv, NULL);
@@ -192,6 +194,11 @@ main (int    argc,
   ADD_IMAGE_TEST (add_layer);
   ADD_IMAGE_TEST (remove_layer);
 
-  /* Run the tests and return status */
-  return g_test_run ();
+  /* Run the tests */
+  result = g_test_run ();
+
+  /* Exit so we don't break script-fu plug-in wire */
+  gimp_exit (gimp, TRUE);
+
+  return result;
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]