diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-01-08 14:52:07 +0000 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-01-08 19:33:08 +0100 |
commit | c7235d9550ff5596d7e5540b98f1ff8b121df24d (patch) | |
tree | a5ba6ab934e84d75fc158fa1683fbd5f40773c33 /xmloff | |
parent | ebb6c2576af8d883ddf8eb09e3969c50d9ac07c9 (diff) |
ofz#19933 Null-dereference READ
since...
commit e1383444c6d00f5d0b1d507670517f45988b9cc7
Date: Tue Jan 7 13:01:41 2020 +0200
extract some common code from ImportContext classes
which reduces code bloat, and lets us log when elements are ignored
Change-Id: I873d14c07b8f2c62f7b1f4c7dc05c566fb35f458
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86437
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff')
-rw-r--r-- | xmloff/source/style/xmlnumfi.cxx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx index d74353bcf314..199d8d7f3846 100644 --- a/xmloff/source/style/xmlnumfi.cxx +++ b/xmloff/source/style/xmlnumfi.cxx @@ -1550,6 +1550,12 @@ SvXMLImportContextRef SvXMLNumFormatContext::CreateChildContext( break; } + if( !pContext ) + { + SAL_WARN("xmloff.core", "No context for unknown-element " << rLName); + pContext = new SvXMLImportContext(GetImport(), nPrfx, rLName); + } + return pContext; } |