add more nullptr checks, related tdf#100820

See
http://crashreport.libreoffice.org/stats/crash_details/8569250c-b04a-43b0-b4b8-4b3a94daffe1

Change-Id: I9070be3db57e77befe70c0a32ef6aa54c6c1cf85
Reviewed-on: https://gerrit.libreoffice.org/27842
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
This commit is contained in:
Markus Mohrhard
2016-08-03 20:10:05 +02:00
parent 26bd99076a
commit 626a1aa960

View File

@ -194,7 +194,7 @@ uno::Reference<awt::XWindow> MMCurrentEntryController::createItemWindow(const un
IMPL_LINK_TYPED(MMCurrentEntryController, CurrentEditUpdatedHdl, Edit&, rEdit, void)
{
SwView* pView = ::GetActiveView();
SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem();
SwMailMergeConfigItem* pConfigItem = pView ? pView->GetMailMergeConfigItem() : nullptr;
if (!pConfigItem)
return;
@ -215,7 +215,7 @@ void MMCurrentEntryController::statusChanged(const frame::FeatureStateEvent& rEv
return;
SwView* pView = ::GetActiveView();
SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem();
SwMailMergeConfigItem* pConfigItem = pView ? pView->GetMailMergeConfigItem() : nullptr;
if (!pConfigItem || !rEvent.IsEnabled)
{
@ -261,7 +261,7 @@ uno::Reference<awt::XWindow> MMExcludeEntryController::createItemWindow(const un
IMPL_STATIC_LINK_TYPED(MMExcludeEntryController, ExcludeHdl, CheckBox&, rCheckbox, void)
{
SwView* pView = ::GetActiveView();
SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem();
SwMailMergeConfigItem* pConfigItem = pView ? pView->GetMailMergeConfigItem() : nullptr;
if (pConfigItem)
pConfigItem->ExcludeRecord(pConfigItem->GetResultSetPosition(), rCheckbox.IsChecked());
@ -273,7 +273,7 @@ void MMExcludeEntryController::statusChanged(const frame::FeatureStateEvent& rEv
return;
SwView* pView = ::GetActiveView();
SwMailMergeConfigItem* pConfigItem = pView->GetMailMergeConfigItem();
SwMailMergeConfigItem* pConfigItem = pView ? pView->GetMailMergeConfigItem() : nullptr;
if (!pConfigItem || !rEvent.IsEnabled)
{