summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKlaus Schmidinger <vdr@tvdr.de>2000-04-24 09:35:29 +0200
committerKlaus Schmidinger <vdr@tvdr.de>2000-04-24 09:35:29 +0200
commitbd029fcce944a4f0b1ede27d49694be4c8fd438b (patch)
tree7bddd38d2c95473ef7df3893e77ce112a5020f91
parentf308fd8b5dd0fba189db3802e36c2db20c75b6f6 (diff)
downloadvdr-bd029fcce944a4f0b1ede27d49694be4c8fd438b.tar.gz
vdr-bd029fcce944a4f0b1ede27d49694be4c8fd438b.tar.bz2
Bugfix in titleBuffer handling
-rw-r--r--recording.c8
-rw-r--r--recording.h4
2 files changed, 7 insertions, 5 deletions
diff --git a/recording.c b/recording.c
index 6d70bd49..2ac20e00 100644
--- a/recording.c
+++ b/recording.c
@@ -4,7 +4,7 @@
* See the main source file 'osm.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.c 1.4 2000/04/23 09:48:35 kls Exp $
+ * $Id: recording.c 1.5 2000/04/24 09:35:29 kls Exp $
*/
#define _GNU_SOURCE
@@ -104,6 +104,7 @@ void AssertFreeDiskSpace(void)
cRecording::cRecording(const char *Name, time_t Start, int Priority, int LifeTime)
{
+ titleBuffer = NULL;
fileName = NULL;
name = strdup(Name);
start = Start;
@@ -113,6 +114,7 @@ cRecording::cRecording(const char *Name, time_t Start, int Priority, int LifeTim
cRecording::cRecording(cTimer *Timer)
{
+ titleBuffer = NULL;
fileName = NULL;
name = strdup(Timer->file);
start = Timer->StartTime();
@@ -122,6 +124,7 @@ cRecording::cRecording(cTimer *Timer)
cRecording::cRecording(const char *FileName)
{
+ titleBuffer = NULL;
fileName = strdup(FileName);
FileName += strlen(BaseDir) + 1;
char *p = strrchr(FileName, '/');
@@ -140,14 +143,13 @@ cRecording::cRecording(const char *FileName)
name[p - FileName] = 0;
}
}
- titleBuffer = NULL;
}
cRecording::~cRecording()
{
+ delete titleBuffer;
delete fileName;
delete name;
- delete titleBuffer;
}
const char *cRecording::FileName(void)
diff --git a/recording.h b/recording.h
index 3151896d..4b75a3a6 100644
--- a/recording.h
+++ b/recording.h
@@ -4,7 +4,7 @@
* See the main source file 'osm.c' for copyright information and
* how to reach the author.
*
- * $Id: recording.h 1.4 2000/04/23 09:50:40 kls Exp $
+ * $Id: recording.h 1.5 2000/04/24 09:33:58 kls Exp $
*/
#ifndef __RECORDING_H
@@ -20,8 +20,8 @@ class cRecording : public cListObject {
friend class cRecordings;
private:
char *titleBuffer;
- char *name;
char *fileName;
+ char *name;
public:
time_t start;
int priority;