diff -r 7c83eb6a55bd -r bc26c42d2eec plugins/python/plc_python.c --- a/plugins/python/plc_python.c Wed Dec 09 00:56:18 2009 +0100 +++ b/plugins/python/plc_python.c Wed Dec 09 01:11:48 2009 +0100 @@ -157,6 +157,8 @@ char* next_command; PYTHON_EVAL* data__; //printf("PythonIterator result %%s\n", result); + /*emergency exit*/ + if(PythonState & PYTHON_FINISHED) return NULL; /* take python mutex to prevent changing PLC data while PLC running */ LockPython(); /* Get current FB */