[Mesa-dev] [PATCH] i965/screen: Check that given format is valid
Topi Pohjolainen
topi.pohjolainen at gmail.com
Thu Sep 21 07:22:57 UTC 2017
CID: 1418110
Fixes: 939b53d3325 "i965/screen: Implement queryDmaBufFormatModifierAttirbs"
CC: Jason Ekstrand <jason at jlekstrand.net>
Signed-off-by: Topi Pohjolainen <topi.pohjolainen at intel.com>
---
src/mesa/drivers/dri/i965/intel_screen.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
index bc2bba00b6..f85d1ba51d 100644
--- a/src/mesa/drivers/dri/i965/intel_screen.c
+++ b/src/mesa/drivers/dri/i965/intel_screen.c
@@ -830,6 +830,8 @@ intel_query_format_modifier_attribs(__DRIscreen *dri_screen,
{
struct intel_screen *screen = dri_screen->driverPrivate;
const struct intel_image_format *f = intel_image_format_lookup(fourcc);
+ if (f == NULL)
+ return false;
if (!modifier_is_supported(&screen->devinfo, f, 0, modifier))
return false;
--
2.11.0
More information about the mesa-dev
mailing list