diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2013-06-26 18:13:09 -0500 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2013-06-27 12:41:33 +0000 |
commit | 3f8445b20e416ae913d68a31d522b948fe4b1684 (patch) | |
tree | eefdc370d44c8fcef87f1b0f335d6ac5778b1abb /cui | |
parent | 5080a76abbbb9f965bf9658e5f543188961d9ff8 (diff) |
coverity#1038294 Explicit null dereference
Change-Id: Ifab48223b505a3061e70e5bc8741a293100a24bc
Reviewed-on: https://gerrit.libreoffice.org/4555
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'cui')
-rw-r--r-- | cui/source/tabpages/backgrnd.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx index 16f8d95f9e6a..ea37ea54c4eb 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 |