diff --git a/extensions/typeaheadfind/src/nsTypeAheadFind.cpp b/extensions/typeaheadfind/src/nsTypeAheadFind.cpp index 807f73d0208..9663c144460 100644 --- a/extensions/typeaheadfind/src/nsTypeAheadFind.cpp +++ b/extensions/typeaheadfind/src/nsTypeAheadFind.cpp @@ -2275,7 +2275,7 @@ nsTypeAheadFind::RemoveWindowListeners(nsIDOMWindow *aDOMWin) nsCOMPtr piTarget(do_QueryInterface(chromeEventHandler)); nsCOMPtr systemGroup; piTarget->GetSystemEventGroup(getter_AddRefs(systemGroup)); - nsCOMPtr target(do_QueryInterface(receiver)); + nsCOMPtr target(do_QueryInterface(piTarget)); target->RemoveGroupedEventListener(NS_LITERAL_STRING("keypress"), NS_STATIC_CAST(nsIDOMKeyListener*, this),