sw/source/uibase/shells/grfsh.cxx | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
New commits: commit 49b1d8a7be380ee06c0012bb8638ff7feca19a40 Author: Marco Cecchetti <marco.cecche...@collabora.com> Date: Wed Jul 5 11:50:45 2017 +0200 Fix a bit obscure pointer check. Change-Id: I843b7e15e6239288359590d2c40c0e6b5f8168ea Reviewed-on: https://gerrit.libreoffice.org/39569 Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index 583a234443fe..3b6eeda36108 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -132,11 +132,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) case SID_SAVE_GRAPHIC: { GraphicAttr aGraphicAttr; - const GraphicObject* pGraphicObj = rSh.GetGraphicObj(); - if (pGraphicObj) - { - rSh.GetGraphicAttr(aGraphicAttr); - } + rSh.GetGraphicAttr(aGraphicAttr); short nState = RET_CANCEL; if (aGraphicAttr != GraphicAttr()) // the image has been modified @@ -154,11 +150,15 @@ void SwGrfShell::Execute(SfxRequest &rReq) if (nState == RET_YES) { - Graphic aGraphic = pGraphicObj->GetTransformedGraphic(pGraphicObj->GetPrefSize(), pGraphicObj->GetPrefMapMode(), aGraphicAttr); - OUString sGrfNm; - OUString sFilterNm; - rSh.GetGrfNms( &sGrfNm, &sFilterNm ); - GraphicHelper::ExportGraphic( aGraphic, sGrfNm ); + const GraphicObject* pGraphicObj = rSh.GetGraphicObj(); + if (pGraphicObj) + { + Graphic aGraphic = pGraphicObj->GetTransformedGraphic(pGraphicObj->GetPrefSize(), pGraphicObj->GetPrefMapMode(), aGraphicAttr); + OUString sGrfNm; + OUString sFilterNm; + rSh.GetGrfNms( &sGrfNm, &sFilterNm ); + GraphicHelper::ExportGraphic( aGraphic, sGrfNm ); + } } else if (nState == RET_NO) {
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits