2. Fixing segfaults that may happen in some corner cases when VT switching

and during int10 initialization (Egbert Eich).
This commit is contained in:
Egbert Eich 2004-02-11 19:29:37 +00:00
parent 453a0743eb
commit e90274c2bb
2 changed files with 8 additions and 4 deletions

View File

@ -1,4 +1,5 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/common/xf86Bus.c,v 1.79 2003/11/03 05:11:01 tsi Exp $ */
/* $XdotOrg$ */
/*
* Copyright (c) 1997-2003 by The XFree86 Project, Inc.
*
@ -525,14 +526,14 @@ disableAccess(void)
for (i = 0; i < xf86NumScreens; i++) {
peacc = xf86Screens[i]->CurrentAccess->pIoAccess;
while (peacc) {
if (peacc->pAccess->AccessDisable)
if (peacc->pAccess && peacc->pAccess->AccessDisable)
peacc->pAccess->AccessDisable(peacc->pAccess->arg);
peacc = peacc->next;
}
xf86Screens[i]->CurrentAccess->pIoAccess = NULL;
peacc = xf86Screens[i]->CurrentAccess->pMemAccess;
while (peacc) {
if (peacc->pAccess->AccessDisable)
if (peacc->pAccess && peacc->pAccess->AccessDisable)
peacc->pAccess->AccessDisable(peacc->pAccess->arg);
peacc = peacc->next;
}

View File

@ -1,7 +1,8 @@
/* $XFree86: xc/programs/Xserver/hw/xfree86/os-support/linux/int10/linux.c,v 1.31 2003/09/24 02:43:35 dawes Exp $ */
/* $XdotOrg$ */
/*
* linux specific part of the int10 module
* Copyright 1999 Egbert Eich
* Copyright 1999, 2000, 2001, 2002, 2003, 2004 Egbert Eich
*/
#include "xf86.h"
#include "xf86_OSproc.h"
@ -212,7 +213,9 @@ xf86ExtendedInitInt10(int entityIndex, int Flags)
} else
((linuxInt10Priv*)pInt->private)->base_high = NULL;
MapCurrentInt10(pInt);
if (!MapCurrentInt10(pInt))
goto error3;
Int10Current = pInt;
#ifdef DEBUG