mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-19 04:00:45 +00:00
Fix a couple more crash conditions
This commit is contained in:
parent
b4e69627c7
commit
2d6afa290b
@ -3167,9 +3167,9 @@ void PRS1Import::run()
|
|||||||
session->UpdateSummaries();
|
session->UpdateSummaries();
|
||||||
|
|
||||||
// Save is not threadsafe
|
// Save is not threadsafe
|
||||||
// loader->saveMutex.lock();
|
loader->saveMutex.lock();
|
||||||
session->Store(mach->getDataPath());
|
session->Store(mach->getDataPath());
|
||||||
// loader->saveMutex.unlock();
|
loader->saveMutex.unlock();
|
||||||
|
|
||||||
// Unload them from memory
|
// Unload them from memory
|
||||||
session->TrashEvents();
|
session->TrashEvents();
|
||||||
|
@ -1188,6 +1188,10 @@ EventDataType Session::SearchValue(ChannelID code, qint64 time, bool square)
|
|||||||
qint64 tt = time - el->first();
|
qint64 tt = time - el->first();
|
||||||
|
|
||||||
double i = tt / el->rate();
|
double i = tt / el->rate();
|
||||||
|
if (i> cnt) {
|
||||||
|
qWarning() << "Session" << session() << "time bounds are broken.. There is a fault in the" << machine()->loaderName().toLocal8Bit.data() << "loader";
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
int i1 = int(floor(i));
|
int i1 = int(floor(i));
|
||||||
int i2 = int(ceil(i));
|
int i2 = int(ceil(i));
|
||||||
|
Loading…
Reference in New Issue
Block a user