summaryrefslogtreecommitdiff
path: root/starmath/source/view.cxx
diff options
context:
space:
mode:
authorTakeshi Abe <tabe@fixedpoint.jp>2016-02-05 17:55:34 +0900
committerMichael Stahl <mstahl@redhat.com>2016-02-08 20:44:44 +0000
commit35fe6dfd2e9ff62a2a8634fc2cfe9e574661b545 (patch)
treec812a3f47f9b52f3de11c97b989a29dd81a332cc /starmath/source/view.cxx
parent6c6cb30bf4710683c2f4b59c07637ca3d9a41419 (diff)
starmath: Replace SAL_WARN_IF with assert
These assertions must hold, otherwise the following code would dereference null pointer. Change-Id: I2b3887aad7116a7ea5176630a015975b8fc087f9 Reviewed-on: https://gerrit.libreoffice.org/22140 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
Diffstat (limited to 'starmath/source/view.cxx')
-rw-r--r--starmath/source/view.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 5dcf07dfff4c..f247fa83ac14 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -75,6 +75,7 @@
#include "cursor.hxx"
#include "accessibility.hxx"
#include "ElementsDockingWindow.hxx"
+#include <cassert>
#include <memory>
#define MINZOOM sal_uInt16(25)
@@ -1769,7 +1770,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
if(pFact)
{
xDlg.reset(pFact->CreateSvxZoomDialog(&GetViewFrame()->GetWindow(), aSet));
- SAL_WARN_IF( !xDlg, "starmath", "Dialog creation failed!" );
+ assert(xDlg);
xDlg->SetLimits( MINZOOM, MAXZOOM );
if (xDlg->Execute() != RET_CANCEL)
pSet = xDlg->GetOutputItemSet();