diff --git a/src/bindings/matlab/StructureFields.cpp b/src/bindings/matlab/StructureFields.cpp index 0720699f68..2c324a8412 100644 --- a/src/bindings/matlab/StructureFields.cpp +++ b/src/bindings/matlab/StructureFields.cpp @@ -240,18 +240,18 @@ StructureFields::populateFields() // get structure returns fieldnames, default values and value types // fieldnames are an array of arrays giving values for several aspects of the structure - // SBMLfieldnames = { {'typecode','','',0,0}, ... - //{'metaid', 'metaid', '', 1, 20}, ... - //{'notes', 'notes', '', 1, 1}, ... - //{'annotation', 'annotation', '', 1, 2}, ... - //{'formula', 'formula', '', 1, 5}, ... - //{'variable', 'variable', '', 1, 20}, ... - //{'species', 'species', '', 1, 20}, ... - //{'compartment', 'compartment', '', 1, 20}, ... - //{'name', 'name', '', 1, 20}, ... - //{'units', 'units', '', 1, 20}, ... - // - //{name of the field, sbml name, prefix, is sbml attribute, type enum} + // SBMLfieldnames = { {'typecode','','',0,0}, ... + //{'metaid', 'metaid', '', 1, 20}, ... + //{'notes', 'notes', '', 1, 1}, ... + //{'annotation', 'annotation', '', 1, 2}, ... + //{'formula', 'formula', '', 1, 5}, ... + //{'variable', 'variable', '', 1, 20}, ... + //{'species', 'species', '', 1, 20}, ... + //{'compartment', 'compartment', '', 1, 20}, ... + //{'name', 'name', '', 1, 20}, ... + //{'units', 'units', '', 1, 20}, ... + // + //{name of the field, sbml name, prefix, is sbml attribute, type enum} for (unsigned int i = 0; i < nNumberFields; ++i) { @@ -539,10 +539,10 @@ StructureFields::getNamespacesStructure() * a string that is NULL */ if (pacPrefix == NULL) { - pacPrefix = ""; + pacPrefix = safe_strdup(""); } if (pacURI == NULL) { - pacURI = ""; + pacURI = safe_strdup(""); } mxSetField(mxNSReturn, i, "prefix", mxCreateString(pacPrefix));