Skip to content

Commit

Permalink
Check if mapping group exists in original image before attempting to …
Browse files Browse the repository at this point in the history
…copy (#5089)
  • Loading branch information
AustinSanders authored Dec 2, 2022
1 parent 388ec4f commit bfb43ee
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions isis/src/base/objs/ProcessMosaic/ProcessMosaic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,10 @@ namespace Isis {
trackingLabel->findObject("IsisCube").addGroup(bandBin);

// Write the mapping group to the tracking cube label
PvlGroup & mappingGroup = inLab->findGroup("Mapping", Pvl::Traverse);
trackingLabel->findObject("IsisCube").addGroup(mappingGroup);
if (inLab->findObject("IsisCube").hasGroup("Mapping")) {
PvlGroup & mappingGroup = inLab->findGroup("Mapping", Pvl::Traverse);
trackingLabel->findObject("IsisCube").addGroup(mappingGroup);
}

// Initialize an empty TrackingTable object to manage tracking table in tracking cube
trackingTable = new TrackingTable();
Expand Down

0 comments on commit bfb43ee

Please sign in to comment.