Bug 800498 - Check for null context in MainWindowHook. r=jmathies

This commit is contained in:
Michael Kaply 2012-11-07 08:27:24 -06:00
parent 812bc7697e
commit fe69b25bf8

View File

@ -408,6 +408,9 @@ TaskbarPreview::MainWindowHook(void *aContext,
NS_ASSERTION(nMsg == nsAppShell::GetTaskbarButtonCreatedMessage() ||
nMsg == WM_DESTROY,
"Window hook proc called with wrong message");
NS_ASSERTION(aContext, "Null context in MainWindowHook");
if (!aContext)
return false;
TaskbarPreview *preview = reinterpret_cast<TaskbarPreview*>(aContext);
if (nMsg == WM_DESTROY) {
// nsWindow is being destroyed