var->name could be NULL under ARB_gl_spirv for example. And in any
case, the code is already handing var name being NULL when reading a
variable, so it is consistent to do it writing a variable too.
Reviewed-by: Timothy Arceri <tarceri@itsqueeze.com>
write_add_object(ctx, var);
encode_type_to_blob(ctx->blob, var->type);
blob_write_uint32(ctx->blob, !!(var->name));
- blob_write_string(ctx->blob, var->name);
+ if (var->name)
+ blob_write_string(ctx->blob, var->name);
blob_write_bytes(ctx->blob, (uint8_t *) &var->data, sizeof(var->data));
blob_write_uint32(ctx->blob, var->num_state_slots);
blob_write_bytes(ctx->blob, (uint8_t *) var->state_slots,