Skip to content

Commit

Permalink
Workaround for potential crash in stat_summary() when computations fail
Browse files Browse the repository at this point in the history
  • Loading branch information
piermorel committed Oct 6, 2017
1 parent db98e4b commit 38dd6ef
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions @gramm/stat_summary.m
Original file line number Diff line number Diff line change
Expand Up @@ -333,9 +333,14 @@
hndl=plotci(obj,uni_x,ymean,yci,draw_data,params.geom,params.dodge,params.width);

%Copy handles
hnames=fieldnames(hndl);
for k=1:length(hnames)
obj.results.stat_summary{obj.result_ind,1}.(hnames{k})=hndl.(hnames{k});
if isstruct(hndl)
hnames=fieldnames(hndl);
for k=1:length(hnames)
obj.results.stat_summary{obj.result_ind,1}.(hnames{k})=hndl.(hnames{k});
end
else
hndl
disp('Nothing plotted... Error in summary computation?')
end
end

Expand Down

0 comments on commit 38dd6ef

Please sign in to comment.