mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
PhysxManager.get_global_ptr now returns NULL is SDK initialization fails.
This commit is contained in:
parent
7bd70efba7
commit
c7bdb4ae1b
@ -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;
|
||||
}
|
||||
|
||||
return _global_ptr;
|
||||
if (_global_ptr->_sdk == NULL) {
|
||||
return NULL;
|
||||
}
|
||||
else {
|
||||
return _global_ptr;
|
||||
}
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////
|
||||
|
Loading…
x
Reference in New Issue
Block a user