BGE: Fix T41570: Blender crash when physics createConstraint
Move physicsid type to unsigned long long to avoid crashes on Windows 8.1 64bits. Other systems also modified to put them inline with this solution. Reviewers: dfelinto, brita_, moguri, juicyfruit, campbellbarton Reviewed By: juicyfruit, campbellbarton Subscribers: juicyfruit Differential Revision: https://developer.blender.org/D1122
This commit is contained in:
@@ -36,14 +36,6 @@
|
||||
# pragma warning( disable:4786 )
|
||||
#endif
|
||||
|
||||
#if defined(_WIN64) && !defined(FREE_WINDOWS64)
|
||||
typedef unsigned __int64 uint_ptr;
|
||||
#elif defined(FREE_WINDOWS64)
|
||||
typedef unsigned long long uint_ptr;
|
||||
#else
|
||||
typedef unsigned long uint_ptr;
|
||||
#endif
|
||||
|
||||
#include "RAS_IPolygonMaterial.h"
|
||||
#include "KX_BlenderMaterial.h"
|
||||
#include "KX_GameObject.h"
|
||||
@@ -3294,12 +3286,12 @@ PyObject *KX_GameObject::PyGetAxisVect(PyObject *value)
|
||||
PyObject *KX_GameObject::PyGetPhysicsId()
|
||||
{
|
||||
PHY_IPhysicsController* ctrl = GetPhysicsController();
|
||||
uint_ptr physid=0;
|
||||
unsigned long long physid = 0;
|
||||
if (ctrl)
|
||||
{
|
||||
physid= (uint_ptr)ctrl;
|
||||
physid = (unsigned long long)ctrl;
|
||||
}
|
||||
return PyLong_FromLong((long)physid);
|
||||
return PyLong_FromUnsignedLongLong(physid);
|
||||
}
|
||||
|
||||
PyObject *KX_GameObject::PyGetPropertyNames()
|
||||
|
Reference in New Issue
Block a user