[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [43948] trunk/blender/source/gameengine/ Ketsji/KX_PythonInit.cpp: Fix for [#29910] Crash on reading KX_SoundActuator.sound
Joerg Mueller
nexyon at gmail.com
Tue Feb 7 12:22:53 CET 2012
Revision: 43948
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43948
Author: nexyon
Date: 2012-02-07 11:22:50 +0000 (Tue, 07 Feb 2012)
Log Message:
-----------
Fix for [#29910] Crash on reading KX_SoundActuator.sound
aud is now imported automatically on BGE start.
Modified Paths:
--------------
trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp
Modified: trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp 2012-02-07 08:50:24 UTC (rev 43947)
+++ trunk/blender/source/gameengine/Ketsji/KX_PythonInit.cpp 2012-02-07 11:22:50 UTC (rev 43948)
@@ -1880,6 +1880,14 @@
Py_DECREF(mod);
}
+#ifdef WITH_AUDASPACE
+ /* accessing a SoundActuator's sound results in a crash if aud is not initialised... */
+ {
+ PyObject *mod= PyImport_ImportModuleLevel((char *)"aud", NULL, NULL, NULL, 0);
+ Py_DECREF(mod);
+ }
+#endif
+
initPyTypes();
bpy_import_main_set(maggie);
@@ -1924,6 +1932,14 @@
Py_NoSiteFlag=1;
Py_FrozenFlag=1;
+#ifdef WITH_AUDASPACE
+ /* accessing a SoundActuator's sound results in a crash if aud is not initialised... */
+ {
+ PyObject *mod= PyImport_ImportModuleLevel((char *)"aud", NULL, NULL, NULL, 0);
+ Py_DECREF(mod);
+ }
+#endif
+
initPyTypes();
bpy_import_main_set(maggie);
More information about the Bf-blender-cvs
mailing list