mirror of
https://github.com/vrm-c/UniVRM.git
synced 2026-09-08 11:59:26 -05:00
ArraySegment.Count
This commit is contained in:
@@ -21,7 +21,7 @@ namespace UniGLTF
|
||||
/// </summary>
|
||||
public static void CopyBytesToArray<T>(ArraySegment<byte> src, T[] dst) where T : struct
|
||||
{
|
||||
if (src.Array == null || dst == null)
|
||||
if (src.Array == null || dst == null || src.Count == 0)
|
||||
{
|
||||
throw new System.ArgumentNullException();
|
||||
}
|
||||
@@ -50,7 +50,7 @@ namespace UniGLTF
|
||||
/// </summary>
|
||||
public static void CopyArrayToToBytes<T>(T[] src, ArraySegment<byte> dst) where T : struct
|
||||
{
|
||||
if (dst.Array == null || src == null)
|
||||
if (dst.Array == null || src == null || dst.Count == 0)
|
||||
{
|
||||
throw new System.ArgumentNullException();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user