Skip to content

Commit 4a825d3

Browse files
committed
Avoid calls to bdclose if Simulink is not installed.
1 parent 819e78d commit 4a825d3

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/tools/RunMLX.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ function runMLXFile(testCase)
3232

3333
% Make sure that all Simulink models are closed while
3434
% everything is still on the path.
35-
testCase.addTeardown(@() bdclose("all"))
35+
if ~isempty(ver("simulink"))
36+
testCase.addTeardown(@() bdclose("all"))
37+
end
3638

3739
% Go into a temporary folder, just in case the chapter file
3840
% download / creates any files.

0 commit comments

Comments
 (0)