Module: Mesa
Branch: master
Commit: 712332ed54f14b5ee34c2990e351ca48992488b2
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=712332ed54f14b5ee34c2990e351ca48992488b2

Author: Lionel Landwerlin <[email protected]>
Date:   Thu Feb  8 17:33:09 2018 +0000

i965: prevent potentially null pointer access

Signed-off-by: Lionel Landwerlin <[email protected]>
Reviewed-by: Alejandro PiƱeiro <[email protected]>
CID: 1418110

---

 src/mesa/drivers/dri/i965/intel_screen.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/mesa/drivers/dri/i965/intel_screen.c 
b/src/mesa/drivers/dri/i965/intel_screen.c
index 1f866cf845..3f74ee78f3 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) {

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to