зеркало из https://github.com/mozilla/pjs.git
Bug 332746: null check to prevent crash printing select controls. r+sr=roc
This commit is contained in:
Родитель
68743d6423
Коммит
372b64a72d
|
@ -660,6 +660,10 @@ nsresult nsIView::CreateWidget(const nsIID &aWindowIID,
|
||||||
: nsnull;
|
: nsnull;
|
||||||
trect += offset;
|
trect += offset;
|
||||||
if (aWidgetInitData->mWindowType == eWindowType_popup) {
|
if (aWidgetInitData->mWindowType == eWindowType_popup) {
|
||||||
|
// Without a parent, we can't make a popup. This can happen
|
||||||
|
// when printing
|
||||||
|
if (!parentWidget)
|
||||||
|
return NS_ERROR_FAILURE;
|
||||||
mWindow->Create(parentWidget->GetNativeData(NS_NATIVE_WIDGET), trect,
|
mWindow->Create(parentWidget->GetNativeData(NS_NATIVE_WIDGET), trect,
|
||||||
::HandleEvent, dx, nsnull, nsnull, aWidgetInitData);
|
::HandleEvent, dx, nsnull, nsnull, aWidgetInitData);
|
||||||
} else {
|
} else {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче