summaryrefslogtreecommitdiff
path: root/vmwgfx/vmwgfx_crtc.c
diff options
context:
space:
mode:
Diffstat (limited to 'vmwgfx/vmwgfx_crtc.c')
-rw-r--r--vmwgfx/vmwgfx_crtc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/vmwgfx/vmwgfx_crtc.c b/vmwgfx/vmwgfx_crtc.c
index eaf87b2..fec04c0 100644
--- a/vmwgfx/vmwgfx_crtc.c
+++ b/vmwgfx/vmwgfx_crtc.c
@@ -250,8 +250,12 @@ crtc_shadow_create(xf86CrtcPtr crtc, void *data, int width, int height)
static void
crtc_shadow_destroy(xf86CrtcPtr crtc, PixmapPtr rotate_pixmap, void *data)
{
- ScreenPtr pScreen = rotate_pixmap->drawable.pScreen;
+ ScreenPtr pScreen;
+ if (rotate_pixmap == NULL)
+ return;
+
+ pScreen = rotate_pixmap->drawable.pScreen;
pScreen->DestroyPixmap(rotate_pixmap);
}