mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-08-24 11:35:24 -05:00
Merge pull request #1254 from ousttrue/fix10/thumbnail_null_check
[1.0] Thumbnail の nullcheck
This commit is contained in:
@@ -81,8 +81,19 @@ namespace UniVRM10
|
||||
value = default;
|
||||
return false;
|
||||
}
|
||||
var thumbnailImage = vrm.Meta.ThumbnailImage;
|
||||
if (!thumbnailImage.HasValue)
|
||||
{
|
||||
value = default;
|
||||
return false;
|
||||
}
|
||||
var imageIndex = thumbnailImage.Value;
|
||||
if (imageIndex < 0 || imageIndex >= data.GLTF.images.Count)
|
||||
{
|
||||
value = default;
|
||||
return false;
|
||||
}
|
||||
|
||||
var imageIndex = vrm.Meta.ThumbnailImage.Value;
|
||||
var gltfImage = data.GLTF.images[imageIndex];
|
||||
|
||||
// data.GLTF.textures は前処理によりユニーク性がある
|
||||
|
||||
Reference in New Issue
Block a user