X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/79f7273499683ed53550ba195ee634cd03f78007..1c4d458b5df83facce7cf71b39ab247eb1447491:/lib/base/console.cpp diff --git a/lib/base/console.cpp b/lib/base/console.cpp index cc994ea9..a29772d8 100644 --- a/lib/base/console.cpp +++ b/lib/base/console.cpp @@ -333,7 +333,18 @@ void eConsoleAppContainer::write( const char *data, int len ) char *tmp = new char[len]; memcpy(tmp, data, len); outbuf.push(queue_data(tmp,len)); - out->start(); + if (out) + out->start(); +} + +void eConsoleAppContainer::write( PyObject *data ) +{ + char *buffer; + int length; + if (PyString_AsStringAndSize(data, &buffer, &length)) + return; + if (buffer && length) + write(buffer, length); } void eConsoleAppContainer::readyWrite(int what)