mirror of
https://gitlab.freedesktop.org/xorg/xserver.git
synced 2026-01-03 18:40:12 +01:00
dri2: Don't crash if pPriv is NULL.
(cherry picked from commit df597709d7)
Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
468787bdd2
commit
f5d1da499c
1 changed files with 10 additions and 2 deletions
|
|
@ -190,10 +190,18 @@ do_get_buffers(DrawablePtr pDraw, int *width, int *height,
|
|||
int need_fake_front = 0;
|
||||
int have_fake_front = 0;
|
||||
int front_format = 0;
|
||||
const int dimensions_match = (pDraw->width == pPriv->width)
|
||||
&& (pDraw->height == pPriv->height);
|
||||
int dimensions_match;
|
||||
int i;
|
||||
|
||||
if (!pPriv) {
|
||||
*width = pDraw->width;
|
||||
*height = pDraw->height;
|
||||
*out_count = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
dimensions_match = (pDraw->width == pPriv->width)
|
||||
&& (pDraw->height == pPriv->height);
|
||||
|
||||
buffers = xalloc((count + 1) * sizeof(buffers[0]));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue