mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 03:30:44 +00:00
Resolve crash on empty days in previous code
This commit is contained in:
parent
16d924bf6c
commit
4b0a40a825
@ -1323,15 +1323,18 @@ void Daily::Load(QDate date)
|
|||||||
QVector<Session *>::iterator i;
|
QVector<Session *>::iterator i;
|
||||||
|
|
||||||
// WebView trashes it without asking.. :(
|
// WebView trashes it without asking.. :(
|
||||||
sessbar=new SessionBar(this);
|
if (cpap) {
|
||||||
sessbar->setMouseTracking(true);
|
sessbar=new SessionBar(this);
|
||||||
connect(sessbar, SIGNAL(toggledSession(Session*)), this, SLOT(doToggleSession(Session*)));
|
sessbar->setMouseTracking(true);
|
||||||
int c=0;
|
connect(sessbar, SIGNAL(toggledSession(Session*)), this, SLOT(doToggleSession(Session*)));
|
||||||
for (i=cpap->begin();i!=cpap->end();++i) {
|
int c=0;
|
||||||
Session * s=*i;
|
|
||||||
sessbar->add(s, cols[c % maxcolors]);
|
for (i=cpap->begin();i!=cpap->end();++i) {
|
||||||
c++;
|
Session * s=*i;
|
||||||
}
|
sessbar->add(s, cols[c % maxcolors]);
|
||||||
|
c++;
|
||||||
|
}
|
||||||
|
} else sessbar=NULL;
|
||||||
//sessbar->update();
|
//sessbar->update();
|
||||||
|
|
||||||
webView->setHtml(html);
|
webView->setHtml(html);
|
||||||
|
Loading…
Reference in New Issue
Block a user