diff --git a/toolkit/components/parentalcontrols/nsParentalControlsServiceWin.cpp b/toolkit/components/parentalcontrols/nsParentalControlsServiceWin.cpp index d0ead48d150a..a3edd56ca370 100644 --- a/toolkit/components/parentalcontrols/nsParentalControlsServiceWin.cpp +++ b/toolkit/components/parentalcontrols/nsParentalControlsServiceWin.cpp @@ -261,10 +261,9 @@ void nsParentalControlsService::LogFileDownload(bool blocked, nsIURI* aSource, EventDataDescCreate(&eventData[WPC_ARGS_FILEDOWNLOADEVENT_BLOCKED], (const void*)&dwBlocked, sizeof(dwBlocked)); - nsCOMPtr local(do_QueryInterface(aTarget)); // May be null - if (local) { + if (aTarget) { // May be null nsAutoString path; - local->GetCanonicalPath(path); + aTarget->GetPath(path); EventDataDescCreate(&eventData[WPC_ARGS_FILEDOWNLOADEVENT_PATH], (const void*)path.get(), ((ULONG)path.Length() + 1) * sizeof(WCHAR));