From f4cee9d5e508faa4ee2037e29b633119d337a7cb Mon Sep 17 00:00:00 2001 From: ferhat Date: Mon, 28 Oct 2013 14:26:42 +0100 Subject: [PATCH] Corrects a bug in the way to test for the presence of the global variables --- mex/sources/bytecode/bytecode.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mex/sources/bytecode/bytecode.cc b/mex/sources/bytecode/bytecode.cc index 5a08c6754..98ee11402 100644 --- a/mex/sources/bytecode/bytecode.cc +++ b/mex/sources/bytecode/bytecode.cc @@ -363,7 +363,7 @@ Get_Arguments_and_global_variables(int nrhs, } } *M_ = mexGetVariable("global", "M_"); - if (M_ == NULL) + if (*M_ == NULL) { ostringstream tmp; tmp << " in main, global variable not found: M_\n"; @@ -371,14 +371,14 @@ Get_Arguments_and_global_variables(int nrhs, } /* Gets variables and parameters from global workspace of Matlab */ *oo_ = mexGetVariable("global", "oo_"); - if (oo_ == NULL) + if (*oo_ == NULL) { ostringstream tmp; tmp << " in main, global variable not found: oo_\n"; throw FatalExceptionHandling(tmp.str()); } *options_ = mexGetVariable("global", "options_"); - if (options_ == NULL) + if (*options_ == NULL) { ostringstream tmp; tmp << " in main, global variable not found: options_\n";