DiffEditor: Do not soft-assert when saving

Do not soft-assert when saving a diff that was saved before.

Change-Id: Iebe06f2bf2ab966869181e0237ed6cc69b2f6045
Reviewed-by: Jarek Kobus <jaroslaw.kobus@theqtcompany.com>
This commit is contained in:
Tobias Hunger
2015-03-12 15:46:16 +01:00
parent ca41c24cc6
commit 1c8b691620

View File

@@ -76,10 +76,11 @@ DiffEditorDocument::~DiffEditorDocument()
*/
void DiffEditorDocument::setController(DiffEditorController *controller)
{
QTC_ASSERT(isTemporary(), return);
if (m_controller == controller)
return;
QTC_ASSERT(isTemporary(), return);
if (m_controller)
m_controller->deleteLater();
m_controller = controller;