Skip to content

Commit 388b7ba

Browse files
authored
Fix segfault on /add in empty testimony (#431)
More of a band-aid fix, but eh-
1 parent ae9d8d7 commit 388b7ba

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/testimony_recorder.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ void AOClient::addStatement(QStringList packet)
4444
}
4545
else if (area->testimonyRecording() == AreaData::TestimonyRecording::ADD) {
4646
packet[14] = "1";
47+
if (c_statement == 0) {
48+
area->addStatement(c_statement, packet);
49+
}
4750
area->addStatement(c_statement + 1, packet);
4851
area->setTestimonyRecording(AreaData::TestimonyRecording::PLAYBACK);
4952
}

0 commit comments

Comments
 (0)