aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/hw/xfree86/common/xf86Helper.c
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/hw/xfree86/common/xf86Helper.c')
-rw-r--r--xorg-server/hw/xfree86/common/xf86Helper.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/xorg-server/hw/xfree86/common/xf86Helper.c b/xorg-server/hw/xfree86/common/xf86Helper.c
index 2c0629d64..12a877159 100644
--- a/xorg-server/hw/xfree86/common/xf86Helper.c
+++ b/xorg-server/hw/xfree86/common/xf86Helper.c
@@ -217,6 +217,10 @@ xf86DeleteScreen(ScrnInfoPtr pScrn)
int i;
int scrnIndex;
Bool is_gpu = FALSE;
+
+ if (!pScrn)
+ return;
+
if (pScrn->is_gpu) {
/* First check if the screen is valid */
if (xf86NumGPUScreens == 0 || xf86GPUScreens == NULL)
@@ -228,9 +232,6 @@ xf86DeleteScreen(ScrnInfoPtr pScrn)
return;
}
- if (!pScrn)
- return;
-
scrnIndex = pScrn->scrnIndex;
/* If a FreeScreen function is defined, call it here */
if (pScrn->FreeScreen != NULL)