handle NULL arguments to iocsh calls

This commit is contained in:
Michael Davidsaver
2013-07-16 14:43:11 -04:00
parent 1d5250de31
commit 45c93831de

View File

@ -66,6 +66,9 @@ void py(const char* code)
{
PyGILState_STATE state;
if(!code)
return;
state = PyGILState_Ensure();
if(PyRun_SimpleStringFlags(code, NULL)!=0)
@ -79,6 +82,9 @@ void pyfile(const char* file)
FILE *fp;
PyGILState_STATE state;
if(!file)
return;
state = PyGILState_Ensure();
fp = fopen(file, "r");