Skip to content

Commit

Permalink
fix(DmPerformance): null-pointer dereference when playing a NULL-se…
Browse files Browse the repository at this point in the history
…gment
  • Loading branch information
lmichaelis committed May 2, 2024
1 parent 522dd22 commit e4a5619
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions src/Performance.c
Original file line number Diff line number Diff line change
Expand Up @@ -744,10 +744,12 @@ static void DmPerformance_handleSegmentMessage(DmPerformance* slf, DmMessage_Seg
static void DmPerformance_handleMessage(DmPerformance* slf, DmMessage* msg) {
switch (msg->type) {
case DmMessage_SEGMENT:
Dm_report(DmLogLevel_TRACE,
"DmPerformance(Message): time=%d type=segment-change name=\"%s\"",
slf->time,
msg->segment.segment->info.unam);
if (msg->segment.segment) {
Dm_report(DmLogLevel_TRACE,
"DmPerformance(Message): time=%d type=segment-change name=\"%s\"",
slf->time,
msg->segment.segment->info.unam);
}

DmPerformance_handleSegmentMessage(slf, &msg->segment);
break;
Expand Down

0 comments on commit e4a5619

Please sign in to comment.