зеркало из https://github.com/mozilla/gecko-dev.git
Bug 557931 - Crash [@ mozilla::widget::WindowHook::Lookup] with createTaskbarTabPreview. r=robarnold.
This commit is contained in:
Родитель
7c69b11a08
Коммит
847a6fa05d
|
@ -247,6 +247,9 @@ WinTaskbar::CreateTaskbarTabPreview(nsIDocShell *shell, nsITaskbarPreviewControl
|
|||
|
||||
HWND toplevelHWND = ::GetAncestor(GetHWNDFromDocShell(shell), GA_ROOT);
|
||||
|
||||
if (!toplevelHWND)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
nsRefPtr<TaskbarTabPreview> preview(new TaskbarTabPreview(mTaskbar, controller, toplevelHWND, shell));
|
||||
if (!preview)
|
||||
return NS_ERROR_OUT_OF_MEMORY;
|
||||
|
@ -265,6 +268,9 @@ WinTaskbar::GetTaskbarWindowPreview(nsIDocShell *shell, nsITaskbarWindowPreview
|
|||
|
||||
HWND toplevelHWND = ::GetAncestor(GetHWNDFromDocShell(shell), GA_ROOT);
|
||||
|
||||
if (!toplevelHWND)
|
||||
return NS_ERROR_INVALID_ARG;
|
||||
|
||||
nsWindow *window = nsWindow::GetNSWindowPtr(toplevelHWND);
|
||||
|
||||
if (!window)
|
||||
|
|
Загрузка…
Ссылка в новой задаче