Source

pygame / src / scrap.c

Diff from to

File src/scrap.c

 {
     PyObject *mod;
 
+    /* imported needed apis; Do this first so if there is an error
+       the module is not loaded.
+    */
+    import_pygame_base ();
+    if (PyErr_Occurred ()) {
+	return;
+    }
+
     /* create the module */
     mod = Py_InitModule3 ( MODPREFIX "scrap", scrap_builtins, NULL);
-
-    /*imported needed apis*/
-    import_pygame_base ();
 }