forked from qt-creator/qt-creator
QmlDesigner: Fix crash
Change-Id: Ia96a163efb6a612861d5cc90e37a121fcb3db646 Reviewed-by: Aleksei German <aleksei.german@qt.io> Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -324,6 +324,9 @@ void DocumentManager::addFileToVersionControl(const QString &directoryPath, cons
|
||||
|
||||
Utils::FilePath DocumentManager::currentFilePath()
|
||||
{
|
||||
if (!QmlDesignerPlugin::instance()->currentDesignDocument())
|
||||
return {};
|
||||
|
||||
return QmlDesignerPlugin::instance()->documentManager().currentDesignDocument()->fileName();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user