OSDN Git Service

i965: prevent potentially null pointer access
authorLionel Landwerlin <lionel.g.landwerlin@intel.com>
Thu, 8 Feb 2018 17:33:09 +0000 (17:33 +0000)
committerLionel Landwerlin <lionel.g.landwerlin@intel.com>
Fri, 9 Feb 2018 14:02:59 +0000 (14:02 +0000)
Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Alejandro PiƱeiro <apinheiro@igalia.com>
CID: 1418110

src/mesa/drivers/dri/i965/intel_screen.c

index 1f866cf..3f74ee7 100644 (file)
@@ -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) {