Improved check for NULL-pointer deref

Change-Id: I48c49f1463a70c269ac25dc1ea691d020724abb8
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
This commit is contained in:
Robert Loehning
2012-07-26 16:41:51 +02:00
committed by Aurindam Jana
parent 455b677f8e
commit 16a813694f

View File

@@ -285,7 +285,7 @@ void QmlInspectorAdapter::createPreviewForEditor(Core::IEditor *newEditor)
if (!m_engineClientConnected)
return;
if (newEditor && newEditor->id()
if (!newEditor || newEditor->id()
!= QmlJSEditor::Constants::C_QMLJSEDITOR_ID)
return;