From: Karol Herbst Date: Sat, 2 Nov 2019 23:57:28 +0000 (+0100) Subject: nv50/ir: fix crash in isUniform for undefined values X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=538d2c33b86dd9e66a6e900ac8e1cda10a5bfc4d;p=mesa.git nv50/ir: fix crash in isUniform for undefined values Signed-off-by: Karol Herbst Reviewed-by: Ilia Mirkin --- diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp index a181a13a3b1..ae07d967221 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir.cpp @@ -274,6 +274,8 @@ LValue::isUniform() const if (defs.size() > 1) return false; Instruction *insn = getInsn(); + if (!insn) + return false; // let's not try too hard here for now ... return !insn->srcExists(1) && insn->getSrc(0)->isUniform(); }