diff options
author | Dominik Holland <dominik.holland@pelagicore.com> | 2017-03-16 13:52:26 +0100 |
---|---|---|
committer | Dominik Holland <dominik.holland@pelagicore.com> | 2017-03-17 18:21:17 +0000 |
commit | f13523120201c912abf1061919bc22aa13ab9009 (patch) | |
tree | d8c9c54eb3657eaf0dbdd649fafa1d245a3a0b25 | |
parent | 156c4055a09b75543f65572d6315c469f10540a4 (diff) |
Fix crash in QIviSearchAndBrowseModel when no backend is available
Change-Id: Ic689ccf537515d5d9015e4272cf5291ab0e4dc03
Reviewed-by: Vadim Popov <vadim.popov@pelagicore.com>
Reviewed-by: Robert Griebl <robert.griebl@pelagicore.com>
-rw-r--r-- | src/ivicore/qivisearchandbrowsemodel.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/ivicore/qivisearchandbrowsemodel.cpp b/src/ivicore/qivisearchandbrowsemodel.cpp index d7f0f1f..b360f92 100644 --- a/src/ivicore/qivisearchandbrowsemodel.cpp +++ b/src/ivicore/qivisearchandbrowsemodel.cpp @@ -316,7 +316,9 @@ void QIviSearchAndBrowseModelPrivate::updateContentType(const QString &contentTy emit q->queryChanged(m_query); m_contentType = contentType; emit q->contentTypeChanged(m_contentType); - setCanGoBack(searchBackend()->canGoBack(m_identifier, m_contentType)); + + if (searchBackend()) + setCanGoBack(searchBackend()->canGoBack(m_identifier, m_contentType)); resetModel(); } |