From b52bdc5cb7ecd5674a3f40cdd50de615289a583e Mon Sep 17 00:00:00 2001 From: Philip Chimento Date: Sat, 31 Aug 2013 14:07:08 -0700 Subject: [PATCH] Use g_thread_try_new() instead of g_thread_create() g_thread_create() was deprecated in GLib 2.32. We don't use g_thread_new() because the program should not abort if the thread could not be created; rather, it should display an error message and refuse to start the game. --- libchimara/chimara-glk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libchimara/chimara-glk.c b/libchimara/chimara-glk.c index 337cfa5..33c64e8 100644 --- a/libchimara/chimara-glk.c +++ b/libchimara/chimara-glk.c @@ -1236,8 +1236,8 @@ chimara_glk_run(ChimaraGlk *glk, const gchar *plugin, int argc, char *argv[], GE g_object_notify(G_OBJECT(glk), "program-name"); /* Run in a separate thread */ - priv->thread = g_thread_create((GThreadFunc)glk_enter, startup, TRUE, error); - + priv->thread = g_thread_try_new("glk", (GThreadFunc)glk_enter, startup, error); + return !(priv->thread == NULL); } -- 2.30.2