Fixed crash in ChimaraIF::command
authorP. F. Chimento <philip.chimento@gmail.com>
Fri, 19 Nov 2010 21:58:57 +0000 (22:58 +0100)
committerP. F. Chimento <philip.chimento@gmail.com>
Fri, 19 Nov 2010 21:58:57 +0000 (22:58 +0100)
Fixed the threading bug in ChimaraIF::command.

libchimara/chimara-if.c

index c669804ccbd1f5976c9d07de4eb83f2c1d03c070..efbd5297c41dcd008fc874da3c4e2e1f59db7c85 100644 (file)
@@ -104,7 +104,9 @@ chimara_if_waiting(ChimaraGlk *glk)
        gchar *response = g_string_free(priv->response, FALSE);
        priv->response = g_string_new("");
 
+       gdk_threads_enter();
        g_signal_emit_by_name(glk, "command", priv->input, response);
+       gdk_threads_leave();
 
        g_free(priv->input);
        g_free(response);