From: Philip Chimento Date: Wed, 1 Feb 2012 21:06:05 +0000 (+0100) Subject: Identified two more entry points X-Git-Tag: v0.9~42 X-Git-Url: https://git.stderr.nl/gitweb?a=commitdiff_plain;h=e4d3baf4827ea534f2715ae69d29b015a8768b6b;p=projects%2Fchimara%2Fchimara.git Identified two more entry points This fixes an obscure bug! If you create your ChimaraGlk object not with chimara_glk_new() but with g_object_new(), then the library init function was not called. That caused a crash when trying to access the thread-private data. --- diff --git a/libchimara/chimara-glk.c b/libchimara/chimara-glk.c index b7c0a7d..925acd2 100644 --- a/libchimara/chimara-glk.c +++ b/libchimara/chimara-glk.c @@ -170,6 +170,8 @@ G_DEFINE_TYPE(ChimaraGlk, chimara_glk, GTK_TYPE_CONTAINER); static void chimara_glk_init(ChimaraGlk *self) { + chimara_init(); /* This is a library entry point */ + gtk_widget_set_has_window(GTK_WIDGET(self), FALSE); ChimaraGlkPrivate *priv = CHIMARA_GLK_PRIVATE(self); diff --git a/libchimara/chimara-if.c b/libchimara/chimara-if.c index ed132bb..95f8b93 100644 --- a/libchimara/chimara-if.c +++ b/libchimara/chimara-if.c @@ -159,6 +159,8 @@ chimara_if_text_buffer_output(ChimaraGlk *glk, guint32 win_rock, gchar *output) static void chimara_if_init(ChimaraIF *self) { + chimara_init(); /* This is a library entry point */ + CHIMARA_IF_USE_PRIVATE(self, priv); priv->preferred_interpreter[CHIMARA_IF_FORMAT_Z5] = CHIMARA_IF_INTERPRETER_FROTZ; priv->preferred_interpreter[CHIMARA_IF_FORMAT_Z6] = CHIMARA_IF_INTERPRETER_NITFOL;