mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-21 21:20:45 +00:00
Add a critical warning and skip when attempting to add a duplicate session to a Machine object.
This prevents duplicate sessions from being added to Day during a rebuild, but is still not the root cause. The next step will be to address the attempted duplication in Machine.
This commit is contained in:
parent
7d72f71fb4
commit
6f7a49f949
@ -285,6 +285,10 @@ bool Machine::AddSession(Session *s)
|
|||||||
qCritical() << "AddSession() called without a valid profile";
|
qCritical() << "AddSession() called without a valid profile";
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if (sessionlist.contains(s->session())) {
|
||||||
|
qCritical() << "Machine::AddSession called with duplicate session" << s->session() << "for machine" << serial();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (profile->session->ignoreOlderSessions()) {
|
if (profile->session->ignoreOlderSessions()) {
|
||||||
qint64 ignorebefore = profile->session->ignoreOlderSessionsDate().toMSecsSinceEpoch();
|
qint64 ignorebefore = profile->session->ignoreOlderSessionsDate().toMSecsSinceEpoch();
|
||||||
|
Loading…
Reference in New Issue
Block a user