From fed33f8f4f78622ece9de7c37accbd531b4df0d8 Mon Sep 17 00:00:00 2001 From: Joel Andersson Date: Wed, 24 Feb 2016 21:53:03 +0100 Subject: [PATCH] [MATLAB] Issue #66: Fix for multiple modules --- Source/Modules/matlab.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/Modules/matlab.cxx b/Source/Modules/matlab.cxx index cfb2ae5e09c..434e166fc5d 100644 --- a/Source/Modules/matlab.cxx +++ b/Source/Modules/matlab.cxx @@ -2609,13 +2609,14 @@ int MATLAB::insertDirective(Node *n) { String *code = Getattr(n, "code"); String *section = Getattr(n, "section"); - if (Cmp(section, "matlab") == 0) { + if (Cmp(section, "matlab") == 0 && f_wrap_m) { Printv(f_wrap_m, code, NIL); } else if (Cmp(section, "matlabsetup") == 0) { Printv(f_setup_m, code, NIL); } else { Language::insertDirective(n); } + return SWIG_OK; }