Skip to content

Commit

Permalink
mkmodel: fix crash when generator is not specified
Browse files Browse the repository at this point in the history
  • Loading branch information
rasky committed Dec 5, 2023
1 parent f3fed10 commit 0ffd5e6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tools/mkmodel/mkmodel.c
Original file line number Diff line number Diff line change
Expand Up @@ -1654,7 +1654,7 @@ int convert(const char *infn, const char *outfn)
return 1;
}

if (strstr(data->asset.generator, "Blender") && strstr(data->asset.generator, "v3.4.50")) {
if (data->asset.generator && strstr(data->asset.generator, "Blender") && strstr(data->asset.generator, "v3.4.50")) {
fprintf(stderr, "Error: Blender version v3.4.1 has buggy glTF export (vertex colors are wrong).\nPlease upgrade Blender and export the model again.\n");
cgltf_free(data);
return 1;
Expand Down

0 comments on commit 0ffd5e6

Please sign in to comment.