Fixed start_gtk to be FALSE when gtk_init_check fails.
authorMatt Birkholz <matt@birkholz.chandler.az.us>
Sat, 16 Jul 2011 00:32:20 +0000 (17:32 -0700)
committerMatt Birkholz <matt@birkholz.chandler.az.us>
Sat, 16 Jul 2011 00:32:20 +0000 (17:32 -0700)
src/gtk/gtkio.c.stay

index d7ff9609b97dadb651a37548c56a5fa5a0176e69..c04a24c1463d9a72775643cd05ea30e063b2f0cd 100644 (file)
@@ -316,14 +316,17 @@ start_gtk (int *argc, char ***argv)
      successful.  Returns FALSE when gtk_init_check failed, or
      gtk_main is already running. */
 
+  gboolean initted = FALSE;
+
   if (scheme_source != NULL)
-    return (FALSE);
+    return (initted);
 
   g_thread_init (NULL);
   gdk_threads_init ();
   gdk_threads_enter ();
+
   if (gtk_init_check (argc, argv)) {
-    gboolean ret = TRUE;
+    initted = TRUE;
     CalloutTrampIn tramp = &Scm_continue_start_gtk;
 
     /* Prep the machine for re-entry via scheme_source->dispatch(),
@@ -331,7 +334,7 @@ start_gtk (int *argc, char ***argv)
        C-CALL-CONTINUE, which should call Scm_continue_start_gtk().
        That function expects one gboolean in the top CSTACK frame. */
     callout_unseal (tramp);
-    CSTACK_PUSH (gboolean, ret);
+    CSTACK_PUSH (gboolean, initted);
     CSTACK_PUSH (int, cstack_depth);
     CSTACK_PUSH (CalloutTrampIn, tramp);
 
@@ -340,7 +343,7 @@ start_gtk (int *argc, char ***argv)
     destroy_scheme_source ();
   }
   gdk_threads_leave ();
-  return TRUE;
+  return initted;
 }
 
 void