if (nsPluginWindowType_Window == mPluginWindow.type)
if (!mPluginWindow || nsPluginWindowType_Window == mPluginWindow->type)
nsresult nsPluginInstanceOwner::DispatchKeyToPlugin(nsIDOMEvent* aKeyEvent){#ifndef XP_MAC  if (nsPluginWindowType_Window == mPluginWindow.type)    return NS_ERROR_FAILURE; // means consume event  // continue only for cases without child window#endif  if (mInstance) {    nsCOMPtr<nsIPrivateDOMEvent> privateEvent(do_QueryInterface(aKeyEvent));    if (privateEvent) {      nsKeyEvent* keyEvent = nsnull;      privateEvent->GetInternalNSEvent((nsEvent**)&keyEvent);      if (keyEvent) {        nsEventStatus rv = ProcessEvent(*keyEvent);        if (nsEventStatus_eConsumeNoDefault == rv) {          aKeyEvent->PreventDefault();          nsCOMPtr<nsIDOMNSEvent> nsevent(do_QueryInterface(aKeyEvent));          if (nsevent) {            nsevent->PreventBubble();          }          return NS_ERROR_FAILURE; // means consume event        }      }      else NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::DispatchKeyToPlugin failed, keyEvent null");       }    else NS_ASSERTION(PR_FALSE, "nsPluginInstanceOwner::DispatchKeyToPlugin failed, privateEvent null");     }  return NS_OK;}    