mirror of
https://projects.vdr-developer.org/git/vdr-plugin-tvguide.git
synced 2023-10-05 15:01:48 +02:00
Fixed possible crash
This commit is contained in:
parent
4a45965fb3
commit
6a6e477b7a
@ -11,6 +11,13 @@ cDummyGrid::cDummyGrid(cChannelColumn *c, time_t start, time_t end) : cGrid(c) {
|
|||||||
cDummyGrid::~cDummyGrid(void) {
|
cDummyGrid::~cDummyGrid(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
time_t cDummyGrid::Duration(void) {
|
||||||
|
//max Duration 5h
|
||||||
|
if (end - start > 18000)
|
||||||
|
return 18000;
|
||||||
|
return (end - start);
|
||||||
|
};
|
||||||
|
|
||||||
void cDummyGrid::SetViewportHeight() {
|
void cDummyGrid::SetViewportHeight() {
|
||||||
int viewportHeightOld = viewportHeight;
|
int viewportHeightOld = viewportHeight;
|
||||||
viewportHeight = Duration() / 60 * tvguideConfig.minutePixel;
|
viewportHeight = Duration() / 60 * tvguideConfig.minutePixel;
|
||||||
|
@ -9,7 +9,7 @@ private:
|
|||||||
time_t end;
|
time_t end;
|
||||||
cString strText;
|
cString strText;
|
||||||
void drawText();
|
void drawText();
|
||||||
time_t Duration(void) { return (end - start); };
|
time_t Duration(void);
|
||||||
public:
|
public:
|
||||||
cDummyGrid(cChannelColumn *c, time_t start, time_t end);
|
cDummyGrid(cChannelColumn *c, time_t start, time_t end);
|
||||||
virtual ~cDummyGrid(void);
|
virtual ~cDummyGrid(void);
|
||||||
|
Loading…
Reference in New Issue
Block a user