if (nsPluginWindowType_Window == mPluginWindow.type)
if (!mPluginWindow || nsPluginWindowType_Window == mPluginWindow->type)
nsresult nsPluginInstanceOwner::DispatchFocusToPlugin(nsIDOMEvent* aFocusEvent){#ifndef XP_MAC  if (nsPluginWindowType_Window == mPluginWindow.type)    return NS_ERROR_FAILURE; // means consume event  // continue only for cases without child window#endif  nsCOMPtr<nsIPrivateDOMEvent> privateEvent(do_QueryInterface(aFocusEvent));  if (privateEvent) {    nsEvent * theEvent;    privateEvent->GetInternalNSEvent(&theEvent);    if (theEvent) {      nsGUIEvent focusEvent;      memset(&focusEvent, 0, sizeof(focusEvent));      focusEvent.message = theEvent->message; // we only care about the message in ProcessEvent      nsEventStatus rv = ProcessEvent(focusEvent);      if (nsEventStatus_eConsumeNoDefault == rv) {        aFocusEvent->PreventDefault();        nsCOMPtr<nsIDOMNSEvent> nsevent(do_QueryInterface(aFocusEvent));        if (nsevent) {          nsevent->PreventBubble();        }        return NS_ERROR_FAILURE; // means consume event      }    }    else NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::DispatchFocusToPlugin failed, focusEvent null");     }  else NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::DispatchFocusToPlugin failed, privateEvent null");       return NS_OK;}    