diff options
author | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-02-19 18:02:40 +0100 |
---|---|---|
committer | Shawn Rutledge <shawn.rutledge@qt.io> | 2020-02-19 18:20:09 +0100 |
commit | 34f52195b99a03dfdacc6b1eccb236d553b93ac0 (patch) | |
tree | 7ccf3c2458bfa56884e9939f87534a482cdb715f | |
parent | d294872b34667199455ca169d68be392942c3b00 (diff) |
Guard against crash in QQuickPdfSearchModel::setDocument()
If the document is null, ignore it.
Change-Id: I3cebd049fb5d16d0064dddf00183f231019ef03c
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
-rw-r--r-- | src/pdf/quick/qquickpdfsearchmodel.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/pdf/quick/qquickpdfsearchmodel.cpp b/src/pdf/quick/qquickpdfsearchmodel.cpp index ec998ef0c..a4b457841 100644 --- a/src/pdf/quick/qquickpdfsearchmodel.cpp +++ b/src/pdf/quick/qquickpdfsearchmodel.cpp @@ -67,7 +67,7 @@ QQuickPdfDocument *QQuickPdfSearchModel::document() const void QQuickPdfSearchModel::setDocument(QQuickPdfDocument *document) { - if (document == m_quickDocument) + if (document == m_quickDocument || !document) return; m_quickDocument = document; |