forked from mirrors/linphone-iphone
Add check on NULL pointer before calling *_get_user_data in the Python wrapper.
This commit is contained in:
parent
c4adb92093
commit
d139c681f1
1 changed files with 1 additions and 1 deletions
|
|
@ -155,7 +155,7 @@ class MethodDefinition:
|
|||
stripped_return_type = strip_leading_linphone(self.return_type)
|
||||
if self.class_['class_has_user_data']:
|
||||
get_user_data_function = self.__find_class_definition(self.return_type)['class_c_function_prefix'] + "get_user_data"
|
||||
self.body += "\tif (" + get_user_data_function + "(cresult) != NULL) {\n"
|
||||
self.body += "\tif ((cresult != NULL) && (" + get_user_data_function + "(cresult) != NULL)) {\n"
|
||||
self.body += "\t\treturn (PyObject *)" + get_user_data_function + "(cresult);\n"
|
||||
self.body += "\t}\n"
|
||||
self.body += "\tpyresult = pylinphone_" + stripped_return_type + "_new_from_native_ptr(&pylinphone_" + stripped_return_type + "Type, cresult);\n"
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue