pbutils: Check that pygst_init() succeeded
authorEdward Hervey <bilboed@bilboed.com>
Tue, 9 Nov 2010 09:58:04 +0000 (10:58 +0100)
committerEdward Hervey <bilboed@bilboed.com>
Tue, 9 Nov 2010 10:04:13 +0000 (11:04 +0100)
gst/pbutilsmodule.c

index c46621f..215eca7 100644 (file)
@@ -45,6 +45,11 @@ initpbutils (void)
 
   /* Make sure gst module is loaded and ready */
   gst = pygst_init ();
+  if (PyErr_Occurred ()) {
+    PyErr_Print ();
+    Py_FatalError ("can't initialize module gst.pbutils");
+  }
+
   gst_pb_utils_init ();
 
   m = Py_InitModule ("pbutils", pypbutils_functions);