only load library is it's not loaded already
This stops matlab from complaining about the library class already existing after it's loaded previously. Signed-off-by: Tim Harder <timothy.harder@analog.com>master
parent
0a75793d9d
commit
9699ec7aa2
14
libiio_if.m
14
libiio_if.m
|
@ -360,12 +360,14 @@ classdef libiio_if < handle
|
|||
% Set the initialization status to fail
|
||||
obj.if_initialized = 0;
|
||||
|
||||
% Load the libiio library
|
||||
try
|
||||
[notfound, warnings] = loadlibrary(obj.libname, obj.hname);
|
||||
catch exception
|
||||
err_msg = exception.message;
|
||||
return;
|
||||
% Load the libiio library
|
||||
if(~libisloaded(obj.libname))
|
||||
try
|
||||
[notfound, warnings] = loadlibrary(obj.libname, obj.hname);
|
||||
catch exception
|
||||
err_msg = exception.message;
|
||||
return;
|
||||
end
|
||||
end
|
||||
|
||||
if(~libisloaded(obj.libname))
|
||||
|
|
Loading…
Reference in New Issue