xorg-x11-server/p_vga-crashfix.diff

21 lines
778 B
Diff

Index: programs/Xserver/render/picture.c
===================================================================
RCS file: /home/eich/cvs/xc/programs/Xserver/render/picture.c,v
retrieving revision 1.1.1.28
diff -u -r1.1.1.28 picture.c
--- programs/Xserver/render/picture.c 25 Nov 2005 10:05:52 -0000 1.1.1.28
+++ programs/Xserver/render/picture.c 28 Nov 2005 18:24:10 -0000
@@ -69,9 +69,11 @@
Bool
AllocatePicturePrivate (ScreenPtr pScreen, int index2, unsigned int amount)
{
- PictureScreenPtr ps = GetPictureScreen(pScreen);
+ PictureScreenPtr ps = GetPictureScreenIfSet(pScreen);
unsigned int oldamount;
+ if (!ps) return TRUE;
+
/* Round up sizes for proper alignment */
amount = ((amount + (sizeof(long) - 1)) / sizeof(long)) * sizeof(long);