summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@gmail.com>2012-11-04 17:27:13 +0100
committerPetr Mladek <pmladek@suse.cz>2012-11-07 11:09:39 +0100
commitfa047d339eb6e534e19656b06e129f1570339f81 (patch)
tree4100612a32cb6bb5c3ac3bf4b19abf3e12b5a2fa
parent17f3f576b2d01c4fd975bc5044549526ac9ec832 (diff)
Fix fdo#56603 by NULL pointer checking in SwDrawTextShell::Execute
Pushed in master as c954e6e1317f82e06fac66556674bc066b429469 Change-Id: I98f246b2bafcf2669a8f6c3ec4c86ccee56519bf Reviewed-on: https://gerrit.libreoffice.org/984 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com> Reviewed-on: https://gerrit.libreoffice.org/985 Tested-by: Miklos Vajna <vmiklos@suse.cz> Reviewed-by: Miklos Vajna <vmiklos@suse.cz>
-rw-r--r--sw/source/ui/shells/drwtxtex.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/sw/source/ui/shells/drwtxtex.cxx b/sw/source/ui/shells/drwtxtex.cxx
index be020a989bb2..33bfacc44bc1 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -165,8 +165,11 @@ void SwDrawTextShell::Execute( SfxRequest &rReq )
if (nSlot == SID_ATTR_CHAR_FONT)
nScriptTypes = pOLV->GetSelectedScriptType();
- aSetItem.PutItemForScriptType( nScriptTypes, pNewAttrs->Get( nWhich ) );
- aNewAttr.Put( aSetItem.GetItemSet() );
+ if (pNewAttrs)
+ {
+ aSetItem.PutItemForScriptType( nScriptTypes, pNewAttrs->Get( nWhich ) );
+ aNewAttr.Put( aSetItem.GetItemSet() );
+ }
}
break;