summaryrefslogtreecommitdiffstats
path: root/src/gbm
diff options
context:
space:
mode:
Diffstat (limited to 'src/gbm')
-rw-r--r--src/gbm/backends/dri/gbm_dri.c5
-rw-r--r--src/gbm/backends/dri/gbm_driint.h2
2 files changed, 6 insertions, 1 deletions
diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
index f7da79cac14..24ed2f1c6ab 100644
--- a/src/gbm/backends/dri/gbm_dri.c
+++ b/src/gbm/backends/dri/gbm_dri.c
@@ -376,7 +376,10 @@ gbm_dri_bo_import(struct gbm_device *gbm,
{
struct wl_drm_buffer *wb;
- wb = wayland_drm_buffer_get((struct wl_resource *) buffer);
+ if (!dri->wl_drm)
+ return NULL;
+
+ wb = wayland_drm_buffer_get(dri->wl_drm, (struct wl_resource *) buffer);
if (!wb)
return NULL;
diff --git a/src/gbm/backends/dri/gbm_driint.h b/src/gbm/backends/dri/gbm_driint.h
index 18fc3c0919e..90d764fb44f 100644
--- a/src/gbm/backends/dri/gbm_driint.h
+++ b/src/gbm/backends/dri/gbm_driint.h
@@ -66,6 +66,8 @@ struct gbm_dri_device {
int *width, int *height,
unsigned int *attachments, int count,
int *out_count, void *data);
+
+ struct wl_drm *wl_drm;
};
struct gbm_dri_bo {