diff options
-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; |