Commit 2bbc9643 authored by Kai Koehne's avatar Kai Koehne
Browse files

Fixes crash when opening a .qml file from command line

Hopefully fixes crash when opening a .qml file from the command line
(mac os x).
parent 14f009da
......@@ -647,8 +647,9 @@ static bool openInDesignMode()
QString QmlJSEditorEditable::preferredMode() const
{
Core::ModeManager *modeManager = Core::ModeManager::instance();
if (modeManager->currentMode()->id() == Core::Constants::MODE_DESIGN
|| modeManager->currentMode()->id() == Core::Constants::MODE_EDIT)
if (modeManager->currentMode()
&& (modeManager->currentMode()->id() == Core::Constants::MODE_DESIGN
|| modeManager->currentMode()->id() == Core::Constants::MODE_EDIT))
{
return modeManager->currentMode()->id();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment