Skip to content

Commit 36fadc3

Browse files
committed
need null check, if match is cancelled
1 parent 2eba506 commit 36fadc3

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

src/dbg_info/dbg_info.c

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1564,19 +1564,22 @@ di_match_artifact_create(String8 key, B32 *cancel_signal, B32 *retry_out, U64 *g
15641564
lane_sync();
15651565

15661566
//- rjf: pick match
1567-
DI_Match match = {0};
1568-
for EachIndex(idx, lane_count())
1569-
{
1570-
if(lane_matches[idx].idx != 0)
1567+
DI_Match match = {0};
1568+
if(lane_matches != 0)
1569+
{
1570+
for EachIndex(idx, lane_count())
15711571
{
1572-
match = lane_matches[idx];
1573-
if(di_key_match(di_key_zero(), preferred_key) || di_key_match(match.key, preferred_key))
1574-
{
1575-
break;
1576-
}
1572+
if(lane_matches[idx].idx != 0)
1573+
{
1574+
match = lane_matches[idx];
1575+
if(di_key_match(di_key_zero(), preferred_key) || di_key_match(match.key, preferred_key))
1576+
{
1577+
break;
1578+
}
1579+
}
15771580
}
1578-
}
1579-
1581+
}
1582+
15801583
//- rjf: package as artifact
15811584
AC_Artifact artifact = {0};
15821585
{

0 commit comments

Comments
 (0)