Avoid making mXineramaIsActive depend on uninitialized numScreens. (Bug 477959) r+sr=roc

This commit is contained in:
L. David Baron 2009-02-19 07:29:27 -08:00
Родитель 725a97ef4b
Коммит e30a93ea0d
1 изменённых файлов: 3 добавлений и 3 удалений

Просмотреть файл

@ -197,12 +197,12 @@ nsScreenManagerGtk :: Init()
if (_XnrmIsActive && _XnrmQueryScreens &&
_XnrmIsActive(GDK_DISPLAY())) {
screenInfo = _XnrmQueryScreens(GDK_DISPLAY(), &numScreens);
// remember for the destructor, if we are really working with Xinerama
mXineramaIsActive = numScreens > 0;
}
}
// remember for the destructor, if we are really working with Xinerama
mXineramaIsActive = numScreens > 0;
// screenInfo == NULL if either Xinerama couldn't be loaded or
// isn't running on the current display
if (!screenInfo || numScreens == 1) {