xbmc/xbmc — pull request #1524 by jbeluch (2012-10-02 18:25:24+00:00)
Title: Fix tracebacks for python api bindings.

Return NULL if the return value of PyXBMCGetUnicodeString indicates an
error. This change is used when parsing arguments from API function calls from python scripts.

Previously, PyXBMCGetUnicodeString would set an error, but the called function would not return NULL. By not returning NULL, the exception would not be raised in the python code. Only when the python script finished execution would the error state get checked. Then, by the time PyErr_Fetch is called, the stack is incorrect.

I tested this in a few places, but am still relatively new to this code, so let me know your thoughts.