Unverified Commit 6c5176f8 authored by Tim Giroux's avatar Tim Giroux Committed by GitHub
Browse files

Fix caminfo uselabel SegFault (#4402)

* conditionally reopen cube to prevent segfault

* relocate cube close
parent 95c149e9
Loading
Loading
Loading
Loading
−1
Changes for isis/src/base/apps/caminfo/CamTools.cpp: 0 added lines, 1 removed line.
Original line number Diff line number Diff line
@@ -335,7 +335,6 @@ namespace Isis {
      if (getFootBlob && band == 0) {
        // Read the footprint from the image labels
        ImagePolygon poly = cube.readFootprint();
        cube.close();
        geos::geom::MultiPolygon *multiP = poly.Polys();
        _polys.push_back(multiP->clone());
        _combined = multiP->clone();
+2
Changes for isis/src/base/apps/caminfo/caminfo.cpp: 2 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -434,6 +434,8 @@ namespace Isis{
        else
          GenerateCSVOutput(incube, general, camstats, statistics, bandGeom, ui);

        incube->close();

        // Clean the data
        delete general;
        general = NULL;