diff options
-rw-r--r-- | src/gallium/drivers/panfrost/midgard/helpers.h | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/gallium/drivers/panfrost/midgard/helpers.h b/src/gallium/drivers/panfrost/midgard/helpers.h index 6d35f4de025..d2855cd89cd 100644 --- a/src/gallium/drivers/panfrost/midgard/helpers.h +++ b/src/gallium/drivers/panfrost/midgard/helpers.h @@ -264,6 +264,10 @@ static struct { static bool midgard_is_integer_op(int op) { - char prefix = alu_opcode_props[op].name[0]; - return (prefix == 'i') || (prefix == 'u'); + const char *name = alu_opcode_props[op].name; + + if (!name) + return false; + + return (name[0] == 'i') || (name[0] == 'u'); } |