summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Versini <arnaud.versini@gmail.com>2012-11-04 17:27:13 +0100
committerNorbert Thiebaud <nthiebaud@gmail.com>2012-11-04 16:45:07 +0000
commitc954e6e1317f82e06fac66556674bc066b429469 (patch)
treeb427ea8d235b31d5a9c2a79f9ba3b27d1cf32e66
parent0159e9e193011053ebe4cc988bd6c740bf232f44 (diff)
Fix fdo#56603 by NULL pointer checking in SwDrawTextShell::Execute
Change-Id: I2dffbac1450682e4d116f10ca86a2837514f70a4 Reviewed-on: https://gerrit.libreoffice.org/984 Reviewed-by: Norbert Thiebaud <nthiebaud@gmail.com> Tested-by: Norbert Thiebaud <nthiebaud@gmail.com>
-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 321ce0aec7e4..37e0f49fbfac 100644
--- a/sw/source/ui/shells/drwtxtex.cxx
+++ b/sw/source/ui/shells/drwtxtex.cxx
@@ -166,8 +166,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;