diff --git a/libs/video/renderer/vulkan/vkgen/vkstruct.r b/libs/video/renderer/vulkan/vkgen/vkstruct.r index cacd19acc..0194aaeaa 100644 --- a/libs/video/renderer/vulkan/vkgen/vkstruct.r +++ b/libs/video/renderer/vulkan/vkgen/vkstruct.r @@ -126,8 +126,10 @@ write_function_tail (Struct *self) static void write_parse_type (Struct *self) { - fprintf (output_file, "\t\treturn PL_ParseStruct (%s_fields, item, data, " - "messages, context);\n", [self outname]); + fprintf (output_file, "\t\tif (!PL_ParseStruct (%s_fields, item, data, " + "messages, context)) {\n", [self outname]); + fprintf (output_file, "\t\t\treturn 0;\n"); + fprintf (output_file, "\t\t}\n"); } static void