diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-09-23 00:05:53 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-09-23 16:47:45 +0200 |
commit | 0656bcf98abfda155df0d318a943459d152333a2 (patch) | |
tree | a727047aa050966a18c9fd0a2bff1d661f0e244e /svx | |
parent | 22e94ab1860b1bdea8d107d4e8824f63c6b1c8c5 (diff) |
coverity#1418337 Unchecked dynamic_cast
Change-Id: Ic7c7030687d39e35610f7aa14555d8b19b11acea
Reviewed-on: https://gerrit.libreoffice.org/42681
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/dialog/ClassificationDialog.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/svx/source/dialog/ClassificationDialog.cxx b/svx/source/dialog/ClassificationDialog.cxx index 43e5260aae53..478c6469a6ce 100644 --- a/svx/source/dialog/ClassificationDialog.cxx +++ b/svx/source/dialog/ClassificationDialog.cxx @@ -155,10 +155,10 @@ std::vector<ClassificationResult> ClassificationDialog::getResult() ESelection aSelection(rSection.mnParagraph, rSection.mnStart, rSection.mnParagraph, rSection.mnEnd); OUString sString = m_pEditWindow->pEdEngine->GetText(aSelection); + const ClassificationField* pClassificationField = pFieldItem ? dynamic_cast<const ClassificationField*>(pFieldItem->GetField()) : nullptr; - if (pFieldItem) + if (pClassificationField) { - const ClassificationField* pClassificationField = dynamic_cast<const ClassificationField*>(pFieldItem->GetField()); aClassificationResults.push_back({ pClassificationField->meType , sString, rSection.mnParagraph }); } else |