Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[fix] closes ##13506. Addon class instances that default to NULL were…

… causing an SEGV. This allows the generated code to handle NULL defaults.
  • Loading branch information...
commit ec413440dcbaf40ca568934263946a55a58952f4 1 parent 39af2a1
Jim Carroll authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  xbmc/interfaces/python/swig.h
View
3  xbmc/interfaces/python/swig.h
@@ -100,7 +100,8 @@ namespace PythonBindings
inline void* retrieveApiInstance(const PyObject* pythonType, const char* expectedType, const char* methodNamespacePrefix,
const char* methodNameForErrorString) throw (XBMCAddon::WrongTypeException)
{
- return doretrieveApiInstance(((PyHolder*)pythonType),((PyHolder*)pythonType)->typeInfo, expectedType, methodNamespacePrefix, methodNameForErrorString);
+ return (pythonType == NULL) ? NULL :
+ doretrieveApiInstance(((PyHolder*)pythonType),((PyHolder*)pythonType)->typeInfo, expectedType, methodNamespacePrefix, methodNameForErrorString);
}
inline void prepareForReturn(XBMCAddon::AddonClass* c) { if(c) c->Acquire(); }
Please sign in to comment.
Something went wrong with that request. Please try again.