Commit 55c8ba40 authored by Waqar Ahmed's avatar Waqar Ahmed Committed by Christoph Cullmann
Browse files

Ensure projectPlugin exists before checking path

parent cf20c309
...@@ -240,7 +240,6 @@ void GotoSymbolWidget::loadGlobalSymbols(const QString &text) ...@@ -240,7 +240,6 @@ void GotoSymbolWidget::loadGlobalSymbols(const QString &text)
if (text.length() < 3 || mode == Local) if (text.length() < 3 || mode == Local)
return; return;
QString currentWord = text; QString currentWord = text;
Tags::TagList list = Tags::getPartialMatchesNoi8n(m_tagFile, currentWord); Tags::TagList list = Tags::getPartialMatchesNoi8n(m_tagFile, currentWord);
...@@ -271,8 +270,8 @@ void GotoSymbolWidget::slotReturnPressed() ...@@ -271,8 +270,8 @@ void GotoSymbolWidget::slotReturnPressed()
if (!fi.exists()) { if (!fi.exists()) {
fileFound = false; fileFound = false;
QObject *projectView = m_mainWindow->pluginView(QStringLiteral("kateprojectplugin")); QObject *projectView = m_mainWindow->pluginView(QStringLiteral("kateprojectplugin"));
QString ret = projectView->property("projectBaseDir").toString(); QString ret = projectView ? projectView->property("projectBaseDir").toString() : QString();
if (!ret.endsWith(QLatin1Char('/'))) { if (!ret.isEmpty() && !ret.endsWith(QLatin1Char('/'))) {
ret.append(QLatin1Char('/')); ret.append(QLatin1Char('/'));
} }
url = ret + file; url = ret + file;
......
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