Skip to content

Commit e8a784a

Browse files
committed
bugfix to BaseSingleSessionApp with empty session after trying to open the session that was already open
1 parent 94607f2 commit e8a784a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

widgets/+wt/+apps/BaseSingleSessionApp.m

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -124,9 +124,11 @@ function close(app)
124124
% Call superclass internal load method
125125
session = app.loadSession_Internal(sessionPath);
126126

127-
% Store the session
127+
% If successful, store the session
128128
% This also triggers app.update(), app.updateTitle()
129-
app.Session = session;
129+
if isscalar(session) && isvalid(session)
130+
app.Session = session;
131+
end
130132

131133
end %function
132134

0 commit comments

Comments
 (0)