diff options
author | Egbert Eich <eich@suse.de> | 2004-02-11 19:29:37 +0000 |
---|---|---|
committer | Egbert Eich <eich@suse.de> | 2004-02-11 19:29:37 +0000 |
commit | e90274c2bba1f66a68c2bc30ddb589dbf6fa0929 (patch) | |
tree | 4bdf5134bb9c7dc5c493f9f01b3adda256f9c9c6 | |
parent | 453a0743eb524da88dd364ccac86f35e61899e64 (diff) |
2. Fixing segfaults that may happen in some corner cases when VT switching
and during int10 initialization (Egbert Eich).
-rw-r--r-- | hw/xfree86/common/xf86Bus.c | 5 | ||||
-rw-r--r-- | hw/xfree86/os-support/linux/int10/linux.c | 7 |
2 files changed, 8 insertions, 4 deletions
diff --git a/hw/xfree86/common/xf86Bus.c b/hw/xfree86/common/xf86Bus.c index 2ffbfa964..388823ddb 100644 --- a/hw/xfree86/common/xf86Bus.c +++ b/hw/xfree86/common/xf86Bus.c @@ -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; } diff --git a/hw/xfree86/os-support/linux/int10/linux.c b/hw/xfree86/os-support/linux/int10/linux.c index 11fe19f67..2f9a0f5ab 100644 --- a/hw/xfree86/os-support/linux/int10/linux.c +++ b/hw/xfree86/os-support/linux/int10/linux.c @@ -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 |