summaryrefslogtreecommitdiff
path: root/sw/source/uibase/utlui
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2021-09-08 15:01:33 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2021-09-08 22:17:05 +0200
commite11386053d3c404fbeab8b66402d68f813f7dd58 (patch)
tree1309275bb4cc8a1bb74372d94a4439fb99762094 /sw/source/uibase/utlui
parent41a55bde344f924edd36dbbeead45c426ee07e4d (diff)
convert some OSL_ENSURE -> assert
where we are just provide checking for a following static_cast. I'd rather have an explicit assert failure than a random crash Change-Id: Iab6c6b056341018deaa74b78b075e564f72c58d9 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/121814 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sw/source/uibase/utlui')
-rw-r--r--sw/source/uibase/utlui/viewlayoutctrl.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/uibase/utlui/viewlayoutctrl.cxx b/sw/source/uibase/utlui/viewlayoutctrl.cxx
index 22346de6b03b..b2f6ef4bea1c 100644
--- a/sw/source/uibase/utlui/viewlayoutctrl.cxx
+++ b/sw/source/uibase/utlui/viewlayoutctrl.cxx
@@ -65,7 +65,7 @@ void SwViewLayoutControl::StateChangedAtStatusBarControl( sal_uInt16 /*nSID*/, S
GetStatusBar().SetItemText( GetId(), OUString() );
else
{
- OSL_ENSURE( dynamic_cast< const SvxViewLayoutItem *>( pState ) != nullptr, "invalid item type" );
+ assert( dynamic_cast< const SvxViewLayoutItem *>( pState ) && "invalid item type" );
const sal_uInt16 nColumns = static_cast<const SvxViewLayoutItem*>( pState )->GetValue();
const bool bBookMode = static_cast<const SvxViewLayoutItem*>( pState )->IsBookMode();