mirror of
https://github.com/Outer-Wilds-New-Horizons/new-horizons.git
synced 2025-12-11 20:15:44 +01:00
Prevent trying to tint null image
This commit is contained in:
parent
5b8bb29dcc
commit
ed49e8b6af
@ -1,4 +1,4 @@
|
||||
using OWML.Common;
|
||||
using OWML.Common;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
@ -194,6 +194,12 @@ namespace NewHorizons.Utility
|
||||
|
||||
public static Texture2D TintImage(Texture2D image, Color tint)
|
||||
{
|
||||
if(image == null)
|
||||
{
|
||||
Logger.LogError($"Tried to tint null image");
|
||||
return null;
|
||||
}
|
||||
|
||||
var pixels = image.GetPixels();
|
||||
for (int i = 0; i < pixels.Length; i++)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user