diff options
author | louis <louis.braun@gmx.de> | 2013-12-06 16:37:13 +0100 |
---|---|---|
committer | louis <louis.braun@gmx.de> | 2013-12-06 16:37:13 +0100 |
commit | e7f92d7549df2f240ef5b95f0617fe98c60a8059 (patch) | |
tree | 393290c8b37cc5711d5f5b9cf2165e0660826abc /displayreplay.c | |
parent | 75303d3102717309422d9024b144630b1f623240 (diff) | |
download | skin-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.c | 9 |
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())); |