summaryrefslogtreecommitdiff
path: root/src/SMAPI/Framework/Content/AssetDataForImage.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/SMAPI/Framework/Content/AssetDataForImage.cs')
-rw-r--r--src/SMAPI/Framework/Content/AssetDataForImage.cs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/SMAPI/Framework/Content/AssetDataForImage.cs b/src/SMAPI/Framework/Content/AssetDataForImage.cs
index 4ae2ad68..aa615a0b 100644
--- a/src/SMAPI/Framework/Content/AssetDataForImage.cs
+++ b/src/SMAPI/Framework/Content/AssetDataForImage.cs
@@ -42,8 +42,8 @@ namespace StardewModdingAPI.Framework.Content
Texture2D target = this.Data;
// get areas
- sourceArea = sourceArea ?? new Rectangle(0, 0, source.Width, source.Height);
- targetArea = targetArea ?? new Rectangle(0, 0, Math.Min(sourceArea.Value.Width, target.Width), Math.Min(sourceArea.Value.Height, target.Height));
+ sourceArea ??= new Rectangle(0, 0, source.Width, source.Height);
+ targetArea ??= new Rectangle(0, 0, Math.Min(sourceArea.Value.Width, target.Width), Math.Min(sourceArea.Value.Height, target.Height));
// validate
if (sourceArea.Value.X < 0 || sourceArea.Value.Y < 0 || sourceArea.Value.Right > source.Width || sourceArea.Value.Bottom > source.Height)