forked from qt-creator/qt-creator
QmlDesigner: Check if process is available
It can be happen that we get output before the process is assigned. Change-Id: I4419b125fc9e7244142c188c8bdf0a030faf850a Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
This commit is contained in:
@@ -525,7 +525,7 @@ void NodeInstanceServerProxy::readThirdDataStream()
|
||||
|
||||
void NodeInstanceServerProxy::printEditorProcessOutput()
|
||||
{
|
||||
while (m_qmlPuppetEditorProcess->canReadLine()) {
|
||||
while (m_qmlPuppetEditorProcess && m_qmlPuppetEditorProcess->canReadLine()) {
|
||||
QByteArray line = m_qmlPuppetEditorProcess->readLine();
|
||||
line.chop(1);
|
||||
qDebug().nospace() << "Editor Puppet: " << qPrintable(line);
|
||||
@@ -535,7 +535,7 @@ void NodeInstanceServerProxy::printEditorProcessOutput()
|
||||
|
||||
void NodeInstanceServerProxy::printPreviewProcessOutput()
|
||||
{
|
||||
while (m_qmlPuppetPreviewProcess->canReadLine()) {
|
||||
while (m_qmlPuppetPreviewProcess && m_qmlPuppetPreviewProcess->canReadLine()) {
|
||||
QByteArray line = m_qmlPuppetPreviewProcess->readLine();
|
||||
line.chop(1);
|
||||
qDebug().nospace() << "Preview Puppet: " << qPrintable(line);
|
||||
@@ -545,7 +545,7 @@ void NodeInstanceServerProxy::printPreviewProcessOutput()
|
||||
|
||||
void NodeInstanceServerProxy::printRenderProcessOutput()
|
||||
{
|
||||
while (m_qmlPuppetRenderProcess->canReadLine()) {
|
||||
while (m_qmlPuppetRenderProcess && m_qmlPuppetRenderProcess->canReadLine()) {
|
||||
QByteArray line = m_qmlPuppetRenderProcess->readLine();
|
||||
line.chop(1);
|
||||
qDebug().nospace() << "Render Puppet: " << qPrintable(line);
|
||||
|
||||
Reference in New Issue
Block a user