Mercurial > octave-nkf
changeset 20304:dc74b700cdec stable
fix crash when selecting an image (bug #45372)
gl-select.h (opengl_selector::draw_image): directly use octave_value columns/rows mehtods instead of blindly casting into Matrix.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Mon, 22 Jun 2015 20:58:57 +0200 |
parents | efe22f9b53a3 |
children | b8c1b3e9aa91 |
files | libgui/graphics/gl-select.cc |
diffstat | 1 files changed, 2 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/libgui/graphics/gl-select.cc Mon Jun 22 12:06:53 2015 -0400 +++ b/libgui/graphics/gl-select.cc Mon Jun 22 20:58:57 2015 +0200 @@ -206,11 +206,11 @@ opengl_selector::draw_image (const image::properties& props) { Matrix xd = props.get_xdata ().matrix_value (); - octave_idx_type nc = props.get_cdata ().matrix_value ().columns (); + octave_idx_type nc = props.get_cdata ().columns (); double x_pix_size = (xd(1) - xd(0)) / (nc - 1); Matrix yd = props.get_ydata ().matrix_value (); - octave_idx_type nr = props.get_cdata ().matrix_value ().rows (); + octave_idx_type nr = props.get_cdata ().rows (); double y_pix_size = (yd(1) - yd(0)) / (nr - 1); ColumnVector p1(3, 0.0), p2(3, 0.0), p3(3, 0.0), p4(3, 0.0);