diff --git a/src/pspm_data_editor.m b/src/pspm_data_editor.m index db7eb7d6..350c7f5b 100644 --- a/src/pspm_data_editor.m +++ b/src/pspm_data_editor.m @@ -370,6 +370,14 @@ function RemovePlot(hObject, chan_id) % handles structure with handles and user data (see GUIDATA) % UIWAIT makes pspm_data_editor wait for user response (see UIRESUME) % handles.lbEpochsvarargout{1} = handles.output; +for i = 1:nargout + varargout{i} = []; %#ok +end + +if isfield(handles, 'output') + varargout{1} = handles.output; +end + delete(hObject); function lbEpochs_Callback(hObject, ~, ~)