Bug 637367 - Add null checks to nsPluginInstanceOwner::DoCocoaEventDrawRect(). r=bsmedberg a=sayrer

This commit is contained in:
Steven Michaud 2011-03-11 17:50:50 -06:00
parent 61c35070ce
commit 472417e274

View File

@ -5857,6 +5857,9 @@ void nsPluginInstanceOwner::Paint(const gfxRect& aDirtyRect, CGContextRef cgCont
void nsPluginInstanceOwner::DoCocoaEventDrawRect(const gfxRect& aDrawRect, CGContextRef cgContext)
{
if (!mInstance || !mObjectFrame)
return;
// The context given here is only valid during the HandleEvent call.
NPCocoaEvent updateEvent;
InitializeNPCocoaEvent(&updateEvent);