sd/source/ui/view/drawview.cxx |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

New commits:
commit 4241f171ad3deb1d272dba12acde50011dd90c3c
Author:     Michael Weghorn <m.wegh...@posteo.de>
AuthorDate: Wed Jul 10 10:56:13 2024 +0100
Commit:     Michael Weghorn <m.wegh...@posteo.de>
CommitDate: Wed Jul 10 18:19:29 2024 +0200

    sd: Switch DBG_ASSERT to assert
    
    This fixes Windows/MSVC build errors like the one reported in [1]:
    
        C:/BuildLO/core/sd/source/ui/view/drawview.cxx(394): error C2220: the
        following warning is treated as an error
        C:\BuildLO        Dereferencing NULL pointer 'pSheet'. : Lines: 285, 
287, 289, 292, 293,
        294, 313, 333, 336, 339, 341, 343, 345, 347, 349, 353, 354, 355, 369,
        373, 372
    
    [1] https://lists.freedesktop.org/archives/libreoffice/2024-July/092158.html
    
    Change-Id: Ib63cc2d48203a4c6ba2f1239feb7dc306de5d11b
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/170279
    Tested-by: Jenkins
    Reviewed-by: Michael Weghorn <m.wegh...@posteo.de>

diff --git a/sd/source/ui/view/drawview.cxx b/sd/source/ui/view/drawview.cxx
index f0dbf7a9d760..de83bfde277b 100644
--- a/sd/source/ui/view/drawview.cxx
+++ b/sd/source/ui/view/drawview.cxx
@@ -295,7 +295,7 @@ void DrawView::SetMasterAttributes( SdrObject* pObject, 
const SdPage& rPage, Sfx
     {
         // Presentation object (except outline)
         SfxStyleSheet* pSheet = rPage.GetTextStyleSheetForObject(pObject);
-        DBG_ASSERT(pSheet, "StyleSheet not found");
+        assert(pSheet && "StyleSheet not found");
 
         SfxItemSet aTempSet( pSheet->GetItemSet() );
         aTempSet.Put( rSet );
@@ -316,7 +316,7 @@ void DrawView::SetMasterAttributes( SdrObject* pObject, 
const SdPage& rPage, Sfx
     {
         // Presentation object (except outline)
         SfxStyleSheet* pSheet = rPage.GetStyleSheetForPresObj( ePresObjKind );
-        DBG_ASSERT(pSheet, "StyleSheet not found");
+        assert(pSheet && "StyleSheet not found");
 
         SfxItemSet aTempSet( pSheet->GetItemSet() );
         aTempSet.Put( rSet );
@@ -342,7 +342,7 @@ void DrawView::SetMasterAttributes( SdrObject* pObject, 
const SdPage& rPage, Sfx
                     OUString::number(nLevel);
                 SfxStyleSheet* pSheet = static_cast<SfxStyleSheet*>(pStShPool->
                                     Find(aName, SfxStyleFamily::Page));
-                DBG_ASSERT(pSheet, "StyleSheet not found");
+                assert(pSheet && "StyleSheet not found");
 
                 SfxItemSet aTempSet( pSheet->GetItemSet() );
 

Reply via email to