summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2013-12-29 19:06:11 +0100
committerAndrzej Hunt <andrzej.hunt@collabora.com>2013-12-29 18:45:21 +0000
commit6cc888babdc3e6414e55f57c0df65135f2ef4804 (patch)
treeb21d327306ddd51734411fb7d99908a43be33747
parent3200e99c48897cf7965cc3acc58fadb686ee2437 (diff)
Resolves: fdo#72961 Crash when you open ODFver.1.0/1.1 created by LibO-3.5/3.6
It seems pAction may be NULL so let's keep on to check it. Change-Id: Ie1a48c96bfa930364053c7c3ad0c940559544e33 Reviewed-on: https://gerrit.libreoffice.org/7228 Reviewed-by: Andrzej Hunt <andrzej.hunt@collabora.com> Tested-by: Andrzej Hunt <andrzej.hunt@collabora.com>
-rw-r--r--vcl/source/gdi/gdimtf.cxx14
1 files changed, 8 insertions, 6 deletions
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 1d89dea13de9..2e7417260c2f 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2765,15 +2765,17 @@ SvStream& operator>>( SvStream& rIStm, GDIMetaFile& rGDIMetaFile )
{
pAction = MetaAction::ReadMetaAction( rIStm, &aReadData );
- if (pAction->GetType() == META_COMMENT_ACTION)
- {
- MetaCommentAction* pCommentAct = static_cast<MetaCommentAction*>(pAction);
- if ( pCommentAct->GetComment() == "EMF_PLUS" )
- rGDIMetaFile.UseCanvas( sal_True );
- }
if( pAction )
+ {
+ if (pAction->GetType() == META_COMMENT_ACTION)
+ {
+ MetaCommentAction* pCommentAct = static_cast<MetaCommentAction*>(pAction);
+ if ( pCommentAct->GetComment() == "EMF_PLUS" )
+ rGDIMetaFile.UseCanvas( sal_True );
+ }
rGDIMetaFile.AddAction( pAction );
+ }
}
}
else