Skip to content

Commit

Permalink
Fix imported HC cards crashing viewer (#185)
Browse files Browse the repository at this point in the history
  • Loading branch information
ManlyMarco authored Sep 5, 2024
1 parent 64fa7e9 commit 4904e4e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/KKManager.Core/Data/Cards/SVS/SamabakeCard.cs
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,14 @@ public static SamabakeCard ParseSvsChara(FileInfo file, BinaryReader reader, Car

public override Image GetCardFaceImage()
{
if (GameParameter != null)
if (GameParameter?.imageData != null)
{
using (var str = new MemoryStream(GameParameter.imageData))
return Image.FromStream(str);
}

return base.GetCardFaceImage();
// Imported HC cards don't have a face image
return null;
}

public static string GetProfession(int profession)
Expand Down

0 comments on commit 4904e4e

Please sign in to comment.