summaryrefslogtreecommitdiff
path: root/sw/source/uibase/uiview/viewsrch.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/uiview/viewsrch.cxx')
-rw-r--r--sw/source/uibase/uiview/viewsrch.cxx8
1 files changed, 6 insertions, 2 deletions
diff --git a/sw/source/uibase/uiview/viewsrch.cxx b/sw/source/uibase/uiview/viewsrch.cxx
index 3eaf8a419d9f..d005899f8229 100644
--- a/sw/source/uibase/uiview/viewsrch.cxx
+++ b/sw/source/uibase/uiview/viewsrch.cxx
@@ -153,8 +153,12 @@ void SwView::ExecSearch(SfxRequest& rReq)
// for now do nothing
case SID_SEARCH_ITEM:
{
- delete s_pSrchItem;
- s_pSrchItem = pArgs->Get(SID_SEARCH_ITEM).Clone();
+ OSL_ENSURE(pArgs, "Args missing");
+ if (pArgs)
+ {
+ delete s_pSrchItem;
+ s_pSrchItem = pArgs->Get(SID_SEARCH_ITEM).Clone();
+ }
}
break;