summaryrefslogtreecommitdiff
path: root/displayreplay.c
diff options
context:
space:
mode:
authorlouis <louis.braun@gmx.de>2013-12-06 16:37:13 +0100
committerlouis <louis.braun@gmx.de>2013-12-06 16:37:13 +0100
commite7f92d7549df2f240ef5b95f0617fe98c60a8059 (patch)
tree393290c8b37cc5711d5f5b9cf2165e0660826abc /displayreplay.c
parent75303d3102717309422d9024b144630b1f623240 (diff)
downloadskin-nopacity-e7f92d7549df2f240ef5b95f0617fe98c60a8059.tar.gz
skin-nopacity-e7f92d7549df2f240ef5b95f0617fe98c60a8059.tar.bz2
fixed a crash for recordings without valid title in info file
Diffstat (limited to 'displayreplay.c')
-rw-r--r--displayreplay.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/displayreplay.c b/displayreplay.c
index 0f331bb..d7f7045 100644
--- a/displayreplay.c
+++ b/displayreplay.c
@@ -295,7 +295,14 @@ void cNopacityDisplayReplay::DrawScreenResolution(void) {
void cNopacityDisplayReplay::SetRecording(const cRecording *Recording) {
const cRecordingInfo *RecordingInfo = Recording->Info();
- SetTitle(RecordingInfo->Title());
+ const char *recName = RecordingInfo->Title();
+ if (!recName) {
+ recName = Recording->Name();
+ }
+ if (!recName) {
+ recName = *Recording->BaseName();
+ }
+ SetTitle(recName);
cString info2;
if (RecordingInfo->ShortText())
info2 = cString::sprintf("%s - %s %s", RecordingInfo->ShortText(), *ShortDateString(Recording->Start()), *TimeString(Recording->Start()));