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:54:22 +0000
commite93c54652931e47b82a6711896f8269079097d48 (patch)
tree8a9365cc8670542e2f94f3ef1e28258810d85d41
parent74614f173f9e4404cc7e8dfe538ee4d815897ce2 (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 (cherry picked from commit ebe616de53b98e419c39782c6615877a12f0edc7)
-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 7b4c91b2e66b..f7635e511880 100644
--- a/vcl/source/gdi/gdimtf.cxx
+++ b/vcl/source/gdi/gdimtf.cxx
@@ -2896,15 +2896,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