From e3fe01e134fc4c53654f9fb36ecd84f40c6f2e72 Mon Sep 17 00:00:00 2001 From: Hiroyoshi Uchiyama Date: Sat, 25 Nov 2017 18:33:46 +0900 Subject: [PATCH] fixed segfault bug while importing SDcard data of Philips Respironics System One (60 Series) Model 560PBT --- sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp b/sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp index ee002bce..a1cd00a2 100644 --- a/sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp +++ b/sleepyhead/SleepLib/loader_plugins/prs1_loader.cpp @@ -1431,9 +1431,11 @@ bool PRS1Import::ParseF0Events() if ((event->family == 0) && (event->familyVersion >= 4)) { // BiPAP Pressure if (!EPAP) { if (!(EPAP = session->AddEventList(CPAP_EPAP, EVL_Event, 0.1F))) { return false; } - + } + if(!IPAP) { if (!(IPAP = session->AddEventList(CPAP_IPAP, EVL_Event, 0.1F))) { return false; } - + } + if(!PS) { if (!(PS = session->AddEventList(CPAP_PS, EVL_Event, 0.1F))) { return false; } } @@ -1464,9 +1466,11 @@ bool PRS1Import::ParseF0Events() } else { if (!EPAP) { if (!(EPAP = session->AddEventList(CPAP_EPAP, EVL_Event, 0.1F))) { return false; } - + } + if(!IPAP) { if (!(IPAP = session->AddEventList(CPAP_IPAP, EVL_Event, 0.1F))) { return false; } - + } + if(!PS) { if (!(PS = session->AddEventList(CPAP_PS, EVL_Event, 0.1F))) { return false; } }