Fix a debug only crash. In the case it found, it shouldn't crash, but should instead assert.

This commit is contained in:
Benjamin Popp 2020-12-26 22:58:19 -06:00
parent 93a4c900e2
commit ec03525442

View File

@ -130,7 +130,7 @@ namespace HavenSoft.HexManiac.Core.Models {
[Conditional("DEBUG")]
private void CheckForEmptyAnchors(int destination, string anchor) {
var run = GetNextRun(destination);
Debug.Assert(run.PointerSources.Count > 0, $"{anchor} refers to {destination:X6}, but has no pointers. So how did we find it?");
Debug.Assert(run.PointerSources == null || run.PointerSources.Count > 0, $"{anchor} refers to {destination:X6}, but has no pointers. So how did we find it?");
}
private void DecodeHeader() {