[gdal-dev] Patch for s57reader.cpp

mrxonx at hotmail.com mrxonx at hotmail.com
Fri Nov 30 08:40:13 PST 2012


A small patch (that prevents a crash on certain datasets). Your line
numbers will certainly be different, but it should work.


--- s57reader.cpp   
+++ s57reader.cpp   
@@ -2313,7 +2313,7 @@
 /* -------------------------------------------------------------------- */
 /*      Add the end node.                                               */
 /* -------------------------------------------------------------------- */
-            if( poVRPT->GetRepeatCount() > 1 )
+            if( (poVRPT != NULL) && poVRPT->GetRepeatCount() > 1 )
             {
                 int nVC_RCID = ParseName( poVRPT, 1 );
                 double dfX, dfY;




More information about the gdal-dev mailing list