diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/appbas.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/sfx2/source/appl/appbas.cxx b/sfx2/source/appl/appbas.cxx index 1a4365bb37f8..085d7885cf03 100644 --- a/sfx2/source/appl/appbas.cxx +++ b/sfx2/source/appl/appbas.cxx @@ -152,12 +152,14 @@ void SfxApplication::PropExec_Impl( SfxRequest &rReq ) { case SID_ATTR_UNDO_COUNT: { - const SfxUInt16Item* pCountItem = rReq.GetArg<SfxUInt16Item>(nSID); - std::shared_ptr< comphelper::ConfigurationChanges > batch( - comphelper::ConfigurationChanges::create()); - officecfg::Office::Common::Undo::Steps::set( - pCountItem->GetValue(), batch); - batch->commit(); + if (const SfxUInt16Item* pCountItem = rReq.GetArg<SfxUInt16Item>(nSID)) + { + std::shared_ptr< comphelper::ConfigurationChanges > batch( + comphelper::ConfigurationChanges::create()); + officecfg::Office::Common::Undo::Steps::set( + pCountItem->GetValue(), batch); + batch->commit(); + } break; } |