diff --git a/shell/main.c b/shell/main.c index 71dde32..5d478fa 100644 --- a/shell/main.c +++ b/shell/main.c @@ -73,6 +73,10 @@ #include "rb-playlist-manager.h" #include "rb-playlist-manager-glue.h" +#ifdef ENABLE_PYTHON +#include "rb-python-module.h" +#endif + #define HAVE_LIBGNOME_GOPTION defined(GNOME_PARAM_GOPTION_CONTEXT) static gboolean debug = FALSE; @@ -322,6 +326,15 @@ main (int argc, char **argv) rb_profile_start ("mainloop"); #ifdef ENABLE_PYTHON + { + /* force python etc. to be loaded. + * otherwise, pyg_begin_allow_threads will crash, + * and even if it didn't, we wouldn't be able to provide + * thread safety for plugins loaded later on. + */ + GObject *z = g_object_new (RB_TYPE_PYTHON_MODULE, NULL); + g_object_unref (z); + } pyg_begin_allow_threads; #endif gtk_main ();