fix compiling on arch

This commit is contained in:
ebbit1q 2026-04-02 20:18:01 +02:00
parent ba786a0289
commit 3cf3fa789d
7 changed files with 108 additions and 56 deletions

View file

@ -265,9 +265,11 @@ void TabReplays::actOpenLocalReplay()
f.close();
GameReplay *replay = new GameReplay;
replay->ParseFromArray(_data.data(), _data.size());
emit openReplay(replay);
if (replay->ParseFromArray(_data.data(), _data.size())) {
emit openReplay(replay);
} else {
qDebug() << "could not parse replay!";
}
}
}
@ -379,9 +381,12 @@ void TabReplays::openRemoteReplayFinished(const Response &r)
const Response_ReplayDownload &resp = r.GetExtension(Response_ReplayDownload::ext);
GameReplay *replay = new GameReplay;
replay->ParseFromString(resp.replay_data());
if (replay->ParseFromString(resp.replay_data())) {
emit openReplay(replay);
emit openReplay(replay);
} else {
qDebug() << "could not parse replay!";
}
}
void TabReplays::actDownload()

View file

@ -277,9 +277,11 @@ void MainWindow::actWatchReplay()
file.close();
replay = new GameReplay;
replay->ParseFromArray(buf.data(), buf.size());
tabSupervisor->openReplay(replay);
if (replay->ParseFromArray(buf.data(), buf.size())) {
tabSupervisor->openReplay(replay);
} else {
qDebug() << "[MainWindow] failed to parse replay!";
}
}
void MainWindow::localGameEnded()