X-Git-Url: http://gitweb.scilab.org/?p=scilab.git;a=blobdiff_plain;f=scilab%2Fmodules%2Fmatio%2Fsci_gateway%2Fc%2Fsci_matfile_listvar.c;h=5003527cdefd1b040dff3d03be2421a43ceefe08;hp=13d8c7aa6dae686b84dbdcacdb8bd3ddb759c26b;hb=d57a2004e4abc482816fad9ca6a20da153c4ec4e;hpb=937cee13551a7201e43c22873c703dde39b0ca94 diff --git a/scilab/modules/matio/sci_gateway/c/sci_matfile_listvar.c b/scilab/modules/matio/sci_gateway/c/sci_matfile_listvar.c index 13d8c7a..5003527 100644 --- a/scilab/modules/matio/sci_gateway/c/sci_matfile_listvar.c +++ b/scilab/modules/matio/sci_gateway/c/sci_matfile_listvar.c @@ -68,7 +68,12 @@ int sci_matfile_listvar(char* fname, void* pvApiCtx) /* Gets the corresponding matfile */ matfile_manager(MATFILEMANAGER_GETFILE, &fileIndex, &matfile); - + if (matfile == NULL) + { + Scierror(999, _("%s: Invalid file identifier.\n"), fname); + return FALSE; + } + /* Back to the beginning of the file */ if (Mat_Rewind(matfile) != 0) {