handle NULL arguments to iocsh calls
This commit is contained in:
@ -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");
|
||||
|
Reference in New Issue
Block a user