diff options
author | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-05-05 11:01:33 +0200 |
---|---|---|
committer | Benjamin Franzke <benjaminfranzke@googlemail.com> | 2011-05-16 10:46:52 +0200 |
commit | cf40dc16fc449e7611d88cac18286261c50a683d (patch) | |
tree | df5e906dd1f35482daaaf04e99edf57b2a6b0155 /src/gbm/dri.c | |
parent | bb6c57dae428a8202923ef43390502e1bb538f31 (diff) |
gbm/dri: bo_from_egl_image: Check lookup_egl_image being set
Diffstat (limited to 'src/gbm/dri.c')
-rw-r--r-- | src/gbm/dri.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/gbm/dri.c b/src/gbm/dri.c index dc40d0fbbf..a8c588a6ea 100644 --- a/src/gbm/dri.c +++ b/src/gbm/dri.c @@ -171,6 +171,9 @@ dri_screen_create(struct gbm_dri_device *dri) goto free_screen; } + dri->lookup_image = NULL; + dri->lookup_user_data = NULL; + return 0; free_screen: @@ -236,6 +239,9 @@ gbm_dri_bo_create_from_egl_image(struct gbm_device *gbm, return NULL; } + if (dri->lookup_image == NULL) + return NULL; + __DRIimage *tmp = dri->lookup_image(dri->screen, egl_img, dri->lookup_user_data); bo->image = dri_reference_image(dri, tmp, width, height, dri_format, bo); |