cui/source/tabpages/backgrnd.cxx |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

New commits:
commit 3f8445b20e416ae913d68a31d522b948fe4b1684
Author: Norbert Thiebaud <nthieb...@gmail.com>
Date:   Wed Jun 26 18:13:09 2013 -0500

    coverity#1038294 Explicit null dereference
    
    Change-Id: Ifab48223b505a3061e70e5bc8741a293100a24bc
    Reviewed-on: https://gerrit.libreoffice.org/4555
    Reviewed-by: Michael Stahl <mst...@redhat.com>
    Tested-by: Michael Stahl <mst...@redhat.com>

diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index 16f8d95..ea37ea5 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1728,12 +1728,16 @@ IMPL_LINK( SvxBackgroundTabPage, 
ParaDestinationHdl_Impl, ListBox*, pBox )
         SvxBrushItem* pActItem = NULL;
         switch(pParaBck_Impl->nActPos)
         {
-            case PARA_DEST_PARA:
-                pActItem = pParaBck_Impl->pParaBrush;
+        case PARA_DEST_PARA:
+            pActItem = pParaBck_Impl->pParaBrush;
             break;
-            case PARA_DEST_CHAR:
-                pActItem = pParaBck_Impl->pCharBrush;
+        case PARA_DEST_CHAR:
+            pActItem = pParaBck_Impl->pCharBrush;
             break;
+        default:
+            /* we assert here because the rest of the code expect pActItem to 
be non NULL */
+            assert(false);
+            return 0;
         }
         pParaBck_Impl->nActPos = nSelPos;
         if(XFILL_SOLID == lcl_getFillStyle(m_pLbSelect))  // brush selected
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to