diff options
Diffstat (limited to 'sw/source/core/undo/unattr.cxx')
-rw-r--r-- | sw/source/core/undo/unattr.cxx | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sw/source/core/undo/unattr.cxx b/sw/source/core/undo/unattr.cxx index 67b6f06a50a1..160a983b1c00 100644 --- a/sw/source/core/undo/unattr.cxx +++ b/sw/source/core/undo/unattr.cxx @@ -64,8 +64,10 @@ SwUndoFormatAttrHelper::SwUndoFormatAttrHelper(SwFormat& rFormat, bool bSvDrwPt) void SwUndoFormatAttrHelper::SwClientNotify(const SwModify&, const SfxHint& rHint) { - auto pLegacy = dynamic_cast<const sw::LegacyModifyHint*>(&rHint); - if(!pLegacy || !pLegacy->m_pOld) + if (rHint.GetId() != SfxHintId::SwLegacyModify) + return; + auto pLegacy = static_cast<const sw::LegacyModifyHint*>(&rHint); + if(!pLegacy->m_pOld) return; assert(pLegacy->m_pOld->Which() != RES_OBJECTDYING); if(!pLegacy->m_pNew) |