From 9c4389def2b060ef57c1b6a6a214c68d2c2d7a5d Mon Sep 17 00:00:00 2001 From: "saari%netscape.com" Date: Thu, 1 Jul 1999 20:57:28 +0000 Subject: [PATCH] Error checking on QI call prevents crash with multiple DOM nodes of the same ID --- rdf/content/src/nsXULKeyListener.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/rdf/content/src/nsXULKeyListener.cpp b/rdf/content/src/nsXULKeyListener.cpp index 289eea146426..99c1c50fa040 100644 --- a/rdf/content/src/nsXULKeyListener.cpp +++ b/rdf/content/src/nsXULKeyListener.cpp @@ -219,6 +219,9 @@ nsresult nsXULKeyListenerImpl::KeyPress(nsIDOMEvent* aKeyEvent) while (keysetNode) { nsString keysetNodeType; nsCOMPtr keysetElement(do_QueryInterface(keysetNode)); + if(!keysetElement) + return rv; + keysetElement->GetNodeName(keysetNodeType); if (keysetNodeType.Equals("keyset")) { // Given the DOM node and Key Event