Skip to content

Commit 24db096

Browse files
committed
Merge branch 'master' of https://github.com/Unity-Technologies/ScriptableRenderLoop into Branch_batcher
2 parents 85a9988 + 12641d8 commit 24db096

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Assets/ScriptableRenderPipeline/common/TextureCache.cs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -286,14 +286,18 @@ private struct SSliceEntry
286286

287287
public int FetchSlice(Texture texture)
288288
{
289+
var sliceIndex = -1;
290+
291+
if (texture == null)
292+
return sliceIndex;
293+
289294
var texId = (uint)texture.GetInstanceID();
290295

291296
//assert(TexID!=g_InvalidTexID);
292297
if (texId == g_InvalidTexID) return 0;
293298

294299
var bSwapSlice = false;
295300
var bFoundAvailOrExistingSlice = false;
296-
var sliceIndex = -1;
297301

298302
// search for existing copy
299303
if (m_LocatorInSliceArray.ContainsKey(texId))

0 commit comments

Comments
 (0)