Kaydet (Commit) 1bc9ca7f authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Avoid undefined premature downcast to potentially wrong type

Change-Id: I53bf8b74edab720fccc829f9228f7d9c4a8c2dad
üst aa9aff14
...@@ -362,11 +362,10 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos ) ...@@ -362,11 +362,10 @@ void GDIMetaFile::Play( OutputDevice* pOut, size_t nPos )
{ {
if( !Hook() && pAction ) if( !Hook() && pAction )
{ {
MetaCommentAction* pCommentAct = static_cast<MetaCommentAction*>(pAction);
if( pAction->GetType() == META_COMMENT_ACTION && if( pAction->GetType() == META_COMMENT_ACTION &&
pCommentAct->GetComment() == "DELEGATE_PLUGGABLE_RENDERER" ) static_cast<MetaCommentAction*>(pAction)->GetComment() == "DELEGATE_PLUGGABLE_RENDERER" )
{ {
ImplDelegate2PluggableRenderer(pCommentAct, pOut); ImplDelegate2PluggableRenderer(static_cast<MetaCommentAction*>(pAction), pOut);
} }
else else
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment