diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-03-10 09:51:31 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-03-10 11:36:27 +0000 |
commit | 0d33512eccdf90afedcb454ad17e7280e55807fc (patch) | |
tree | 88a06d71a71eab8793839c8b171d99dce204e40a | |
parent | fc19d6af97cbbe6fa69fbb66da32a1972647ebfc (diff) |
coverity#1103674 Unchecked dynamic_cast
Change-Id: I917ace83496f0ed4412ad07eb4fb267416942b96
-rw-r--r-- | sc/source/ui/optdlg/calcoptionsdlg.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/ui/optdlg/calcoptionsdlg.cxx b/sc/source/ui/optdlg/calcoptionsdlg.cxx index 61f527975082..fd48e76b346e 100644 --- a/sc/source/ui/optdlg/calcoptionsdlg.cxx +++ b/sc/source/ui/optdlg/calcoptionsdlg.cxx @@ -404,7 +404,11 @@ void ScCalcOptionsDialog::SelectedDeviceChanged() mpFtMemory->SetText(OUString()); } - OUString aDevice = dynamic_cast<SvLBoxString*>(pEntry->GetItem(1))->GetText(); + SvLBoxString* pBoxEntry = dynamic_cast<SvLBoxString*>(pEntry->GetItem(1)); + if (!pBoxEntry) + return; + + OUString aDevice = pBoxEntry->GetText(); // use english string for configuration if(aDevice == maSoftware) aDevice = OPENCL_SOFTWARE_DEVICE_CONFIG_NAME; |