Fixed that saving project unrelated android manifests crashed

If it didn't find a project corresponding to an android manifest, it
crashed when trying to update that non-existing project.

Change-Id: I27ccaab14c0de8845a161d16becf73eb59c1d9c3
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This commit is contained in:
Eike Ziller
2015-05-28 13:07:01 +02:00
parent d0f9ed7ea4
commit 5e7b17804b

View File

@@ -597,9 +597,11 @@ void AndroidManifestEditorWidget::postSave()
{
const Utils::FileName docPath = m_textEditorWidget->textDocument()->filePath();
ProjectExplorer::Project *project = androidProject(docPath);
if (Target *target = project->activeTarget()) {
AndroidQtSupport *androidQtSupport = AndroidManager::androidQtSupport(target);
androidQtSupport->manifestSaved(target);
if (project) {
if (Target *target = project->activeTarget()) {
AndroidQtSupport *androidQtSupport = AndroidManager::androidQtSupport(target);
androidQtSupport->manifestSaved(target);
}
}
}