free(mod_reply);
- buffer->image = draw->ext->image->createImageWithModifiers(draw->dri_screen,
- width, height,
- format,
- modifiers,
- count,
- buffer);
+ /* don't use createImageWithModifiers() if we have no
+ * modifiers, other things depend on the use flags when
+ * there are no modifiers to know that a buffer can be
+ * shared.
+ */
+ if (modifiers) {
+ buffer->image = draw->ext->image->createImageWithModifiers(draw->dri_screen,
+ width, height,
+ format,
+ modifiers,
+ count,
+ buffer);
+ }
+
free(modifiers);
}
#endif