From 7be4941f5f8e4936e058c5530df6fad6448cac8e Mon Sep 17 00:00:00 2001
From: Julien Nabet <serval2412@yahoo.fr>
Date: Sun, 29 Dec 2013 19:06:11 +0100
Subject: [PATCH 089/109] 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>
(cherry picked from commit 6cc888babdc3e6414e55f57c0df65135f2ef4804)
---
vcl/source/gdi/gdimtf.cxx | 14 ++++++++------
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/vcl/source/gdi/gdimtf.cxx b/vcl/source/gdi/gdimtf.cxx
index 1240500..90e691b 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
--
1.8.4.2