From: Lionel Landwerlin Date: Thu, 8 Feb 2018 17:33:09 +0000 (+0000) Subject: i965: prevent potentially null pointer access X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=712332ed54f14b5ee34c2990e351ca48992488b2;p=mesa.git i965: prevent potentially null pointer access Signed-off-by: Lionel Landwerlin Reviewed-by: Alejandro PiƱeiro CID: 1418110 --- diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c index 1f866cf8459..3f74ee78f37 100644 --- a/src/mesa/drivers/dri/i965/intel_screen.c +++ b/src/mesa/drivers/dri/i965/intel_screen.c @@ -315,7 +315,7 @@ modifier_is_supported(const struct gen_device_info *devinfo, int i; /* ISL had better know about the modifier */ - if (!modinfo) + if (!fmt || !modinfo) return false; if (modinfo->aux_usage == ISL_AUX_USAGE_CCS_E) {