summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLionel Landwerlin <[email protected]>2018-02-08 17:33:09 +0000
committerLionel Landwerlin <[email protected]>2018-02-09 14:02:59 +0000
commit712332ed54f14b5ee34c2990e351ca48992488b2 (patch)
tree9892d8941ccdd166778fffba31cc4bd98bd2d4dc
parent5db29d62ce1fefa3f2ee6e4a4688576fde4bde4a (diff)
i965: prevent potentially null pointer access
Signed-off-by: Lionel Landwerlin <[email protected]> Reviewed-by: Alejandro PiƱeiro <[email protected]> CID: 1418110
-rw-r--r--src/mesa/drivers/dri/i965/intel_screen.c2
1 files changed, 1 insertions, 1 deletions
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) {