Fix T63899: Can't get sound.factory on Windows

This commit is contained in:
Jörg Müller 2019-04-27 00:13:43 +02:00
parent 1fa7d51f34
commit 157cc54ed5

@ -34,11 +34,11 @@ extern void *BKE_sound_get_factory(void *sound);
static PyObject *AUD_getSoundFromPointer(PyObject *self, PyObject *args)
{
long int lptr;
PyObject* lptr = NULL;
if (PyArg_Parse(args, "l:_sound_from_pointer", &lptr)) {
if (PyArg_Parse(args, "O:_sound_from_pointer", &lptr)) {
if (lptr) {
AUD_Sound *sound = BKE_sound_get_factory((void *)lptr);
AUD_Sound* sound = BKE_sound_get_factory(PyLong_AsVoidPtr(lptr));
if (sound) {
Sound *obj = (Sound *)Sound_empty();