diff --git a/xbmc/interfaces/python/xbmcmodule/xbmcvfsmodule.cpp b/xbmc/interfaces/python/xbmcmodule/xbmcvfsmodule.cpp index 0a3e8f07e7df4..75b49115db5e9 100644 --- a/xbmc/interfaces/python/xbmcmodule/xbmcvfsmodule.cpp +++ b/xbmc/interfaces/python/xbmcmodule/xbmcvfsmodule.cpp @@ -64,7 +64,7 @@ extern "C" { PyObject* File_New(PyTypeObject *type, PyObject *args, PyObject *kwds) { PyObject *f_line; - char *cLine; + char *cLine = NULL; if (!PyArg_ParseTuple( args, (char*)"O|s", @@ -82,7 +82,7 @@ extern "C" { return NULL; self->pFile = new CFile(); - if (strncmp(cLine, "w", 1) == 0) + if (cLine && strncmp(cLine, "w", 1) == 0) { CPyThreadState pyState; self->pFile->OpenForWrite(strSource,true);