From 6357c6bfc36908c8e2b81e0cdb41b772093655f1 Mon Sep 17 00:00:00 2001 From: Steven Michaud Date: Tue, 15 Jul 2014 12:03:21 -0500 Subject: [PATCH] Bug 1033295 - Crash in nsWindowDataSource::GetWindowForResource. r=bsmedberg --- xpfe/components/windowds/nsWindowDataSource.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/xpfe/components/windowds/nsWindowDataSource.cpp b/xpfe/components/windowds/nsWindowDataSource.cpp index 55a7abf7092..7ee126e6b23 100644 --- a/xpfe/components/windowds/nsWindowDataSource.cpp +++ b/xpfe/components/windowds/nsWindowDataSource.cpp @@ -292,6 +292,10 @@ NS_IMETHODIMP nsWindowDataSource::GetWindowForResource(const char *aResourceString, nsIDOMWindow** aResult) { + if (NS_WARN_IF(!aResourceString)) { + return NS_ERROR_INVALID_ARG; + } + nsCOMPtr windowResource; gRDFService->GetResource(nsDependentCString(aResourceString), getter_AddRefs(windowResource));