Here we add proper handling of the case when the loading of the session description file fails. Signed-off-by: Yordan Karadzhov <ykaradzhov@xxxxxxxxxx> --- kernel-shark/src/KsMainWindow.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/kernel-shark/src/KsMainWindow.cpp b/kernel-shark/src/KsMainWindow.cpp index 91e0c9f..44221f6 100644 --- a/kernel-shark/src/KsMainWindow.cpp +++ b/kernel-shark/src/KsMainWindow.cpp @@ -1010,7 +1010,16 @@ void KsMainWindow::loadSession(const QString &fileName) return; } - _session.importFromFile(fileName); + if (!_session.importFromFile(fileName)) { + QString text("Unable to open session description file "); + + text.append(fileName); + text.append(".\n"); + _error(text, "loadSessErr1", true, true); + + return; + } + _session.loadPlugins(kshark_ctx, &_plugins); QString dataFile(_session.getDataFile(kshark_ctx)); -- 2.19.1