mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 21:50:12 +01:00
glx: Add missing null check in dri2CreateDrawable
Signed-off-by: Juha-Pekka Heikkila <juhapekka.heikkila@gmail.com> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
56c5ba8f92
commit
ca3df5eeda
1 changed files with 4 additions and 2 deletions
|
|
@ -366,6 +366,10 @@ dri2CreateDrawable(struct glx_screen *base, XID xDrawable,
|
|||
struct dri2_display *pdp;
|
||||
GLint vblank_mode = DRI_CONF_VBLANK_DEF_INTERVAL_1;
|
||||
|
||||
dpyPriv = __glXInitialize(psc->base.dpy);
|
||||
if (dpyPriv == NULL)
|
||||
return NULL;
|
||||
|
||||
pdraw = calloc(1, sizeof(*pdraw));
|
||||
if (!pdraw)
|
||||
return NULL;
|
||||
|
|
@ -395,8 +399,6 @@ dri2CreateDrawable(struct glx_screen *base, XID xDrawable,
|
|||
}
|
||||
|
||||
DRI2CreateDrawable(psc->base.dpy, xDrawable);
|
||||
|
||||
dpyPriv = __glXInitialize(psc->base.dpy);
|
||||
pdp = (struct dri2_display *)dpyPriv->dri2Display;;
|
||||
/* Create a new drawable */
|
||||
pdraw->driDrawable =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue