From 2665c20e63fc1efde8ad8f7e41632cd46a3f0e66 Mon Sep 17 00:00:00 2001 From: Mark Watkins Date: Thu, 31 Jul 2014 06:33:24 +1000 Subject: [PATCH] Fix a bug in that last commit --- sleepyhead/SleepLib/loader_plugins/icon_loader.cpp | 2 +- sleepyhead/SleepLib/loader_plugins/intellipap_loader.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp b/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp index bf0a8680..acc1d3cc 100644 --- a/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp +++ b/sleepyhead/SleepLib/loader_plugins/icon_loader.cpp @@ -291,9 +291,9 @@ int FPIconLoader::OpenMachine(Machine *mach, QString &path) // } int c = Sessions.size(); + finishAddingSessions(); mach->Save(); - finishAddingSessions(); return c; } diff --git a/sleepyhead/SleepLib/loader_plugins/intellipap_loader.cpp b/sleepyhead/SleepLib/loader_plugins/intellipap_loader.cpp index f2fd9e30..070d7ad6 100644 --- a/sleepyhead/SleepLib/loader_plugins/intellipap_loader.cpp +++ b/sleepyhead/SleepLib/loader_plugins/intellipap_loader.cpp @@ -536,7 +536,7 @@ int IntellipapLoader::Open(QString path) sess->UpdateSummaries(); - mach->AddSession(sess); + addSession(sess); } else { delete sess; } @@ -544,8 +544,10 @@ int IntellipapLoader::Open(QString path) } } + finishAddingSessions(); mach->Save(); + delete [] m_buffer; if (qprogress) { qprogress->setValue(100); }