Imported Debian patch 2:1.15.1-0ubuntu2.6
[deb_xorg-server.git] / debian / patches / 227_null_ptr_midispcur.patch
diff --git a/debian/patches/227_null_ptr_midispcur.patch b/debian/patches/227_null_ptr_midispcur.patch
new file mode 100644 (file)
index 0000000..4b26c16
--- /dev/null
@@ -0,0 +1,15 @@
+diff --git a/mi/midispcur.c b/mi/midispcur.c
+index 24b9a70..266c7e0 100644
+--- a/mi/midispcur.c
++++ b/mi/midispcur.c
+@@ -466,6 +466,10 @@ miDCRestoreUnderCursor(DeviceIntPtr pDev, ScreenPtr pScreen,
+     GCPtr pGC;
+     pBuffer = miGetDCDevice(pDev, pScreen);
++
++    if (!pBuffer)
++        return FALSE;
++
+     pSave = pBuffer->pSave;
+     pWin = pScreen->root;