Mercurial > octave
changeset 21803:4950810ce605 stable
__line__.m: Stop intermittent errors when plotting multiple lines (bug #46466).
* __line__.m: Avoid calling cellfun at line 117 if it is known that no
assignment can take place because the LHS index expression is empty.
author | Rik <rik@octave.org> |
---|---|
date | Thu, 02 Jun 2016 09:03:05 -0700 |
parents | 7720b8246f89 |
children | bc266f3134d7 1b5285c20e0e |
files | scripts/plot/draw/private/__line__.m |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/draw/private/__line__.m Tue May 31 14:09:39 2016 -0700 +++ b/scripts/plot/draw/private/__line__.m Thu Jun 02 09:03:05 2016 -0700 @@ -114,8 +114,10 @@ || (nvecpts != 0 && any (nvecpts != cellfun ("size", tmp, 1)))) error ("line: data size_mismatch"); endif - data_args(mask) = cellfun (@(x) x(:,i), data(ismat), - "uniformoutput", false); + if (any (mask)) + data_args(mask) = cellfun (@(x) x(:,i), data(ismat), + "uniformoutput", false); + endif handles(i) = __go_line__ (p, data_args{:}, other_args{:});