From dc5eff7f906bbaf7d8d2b63805bcc5e24e19fcf8 Mon Sep 17 00:00:00 2001 From: Tavmjong Bah Date: Wed, 9 Oct 2019 09:34:55 +0200 Subject: Fix segfault in reading in meshes when xml:space="preserve". Fixes https://gitlab.com/inkscape/inkscape/issues/172 --- src/object/sp-mesh-array.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'src/object/sp-mesh-array.cpp') diff --git a/src/object/sp-mesh-array.cpp b/src/object/sp-mesh-array.cpp index 848e8de3b..61e803c44 100644 --- a/src/object/sp-mesh-array.cpp +++ b/src/object/sp-mesh-array.cpp @@ -860,9 +860,8 @@ bool SPMeshNodeArray::read( SPMeshGradient *mg_in ) { new_patch.setOpacity( istop, opacity ); new_patch.setStopPtr( istop, stop ); } - + ++istop; } - ++istop; } // Loop over stops // Read in tensor string after stops since tensor nodes defined relative to corner nodes. @@ -887,13 +886,12 @@ bool SPMeshNodeArray::read( SPMeshGradient *mg_in ) { } } } + ++icolumn; + if( max_column < icolumn ) max_column = icolumn; } - - ++icolumn; - if( max_column < icolumn ) max_column = icolumn; } + ++irow; } - ++irow; } // Insure we have a true array. -- cgit v1.2.3