PhysxManager.get_global_ptr now returns NULL is SDK initialization fails.

This commit is contained in:
enn0x 2010-03-25 21:35:41 +00:00
parent 7bd70efba7
commit c7bdb4ae1b

View File

@ -40,6 +40,7 @@ PhysxManager() {
else {
physx_cat.error() << "Error when setting up the PhysX subsystem: "
<< get_sdk_error_string(error) << endl;
_sdk = NULL;
}
nassertv_always(error == NXCE_NO_ERROR);
@ -106,7 +107,12 @@ get_global_ptr() {
_global_ptr = new PhysxManager;
}
if (_global_ptr->_sdk == NULL) {
return NULL;
}
else {
return _global_ptr;
}
}
////////////////////////////////////////////////////////////////////