diff --git a/reader/browser/BrowserPage.cpp b/reader/browser/BrowserPage.cpp index cf0a37c4f..708c39bc3 100644 --- a/reader/browser/BrowserPage.cpp +++ b/reader/browser/BrowserPage.cpp @@ -1031,7 +1031,7 @@ bool BrowserPage::removeAllAnnotation() for (int index = 0; index < m_annotations.size(); index++) { deepin_reader::Annotation *annota = m_annotations.at(index); - if (!m_annotations.contains(annota) || (annota && annota->contents().isEmpty())) + if (!annota || !m_annotations.contains(annota) || annota->contents().isEmpty()) continue; annoBoundaries << annota->boundary();