mirror of
https://gitlab.com/pholy/OSCAR-code.git
synced 2025-04-07 11:40:42 +00:00
Fix a crash when canceling a Zeo import.
Also apply the same fix to Dreem import. Resolves #237.
This commit is contained in:
parent
da0b4e0a1f
commit
84a2b5cfd1
@ -23,6 +23,17 @@
|
|||||||
|
|
||||||
static QSet<QString> s_unexpectedMessages;
|
static QSet<QString> s_unexpectedMessages;
|
||||||
|
|
||||||
|
DreemLoader::DreemLoader()
|
||||||
|
{
|
||||||
|
m_type = MT_SLEEPSTAGE;
|
||||||
|
csv = nullptr;
|
||||||
|
}
|
||||||
|
|
||||||
|
DreemLoader::~DreemLoader()
|
||||||
|
{
|
||||||
|
closeCSV();
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
DreemLoader::Detect(const QString & path)
|
DreemLoader::Detect(const QString & path)
|
||||||
{
|
{
|
||||||
|
@ -20,8 +20,8 @@ const int dreem_data_version = 2;
|
|||||||
class DreemLoader : public MachineLoader
|
class DreemLoader : public MachineLoader
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DreemLoader() { m_type = MT_SLEEPSTAGE; }
|
DreemLoader();
|
||||||
virtual ~DreemLoader() { }
|
virtual ~DreemLoader();
|
||||||
|
|
||||||
virtual bool Detect(const QString & path);
|
virtual bool Detect(const QString & path);
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
ZEOLoader::ZEOLoader()
|
ZEOLoader::ZEOLoader()
|
||||||
{
|
{
|
||||||
m_type = MT_SLEEPSTAGE;
|
m_type = MT_SLEEPSTAGE;
|
||||||
|
csv = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
ZEOLoader::~ZEOLoader()
|
ZEOLoader::~ZEOLoader()
|
||||||
@ -85,6 +86,7 @@ int ZEOLoader::Open(const QString & dirpath)
|
|||||||
int ZEOLoader::OpenFile(const QString & filename)
|
int ZEOLoader::OpenFile(const QString & filename)
|
||||||
{
|
{
|
||||||
if (!openCSV(filename)) {
|
if (!openCSV(filename)) {
|
||||||
|
closeCSV();
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user