Skip to content

Commit

Permalink
Merge pull request QIICR#418 from lorteddie/seg-object-leaked
Browse files Browse the repository at this point in the history
added guard to ensure segmentation object is deleted
  • Loading branch information
fedorov authored Feb 9, 2021
2 parents 83f498e + 80cd966 commit 52e9385
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libsrc/ImageSEGConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@


//DCMTK includes
#include <dcmtk/dcmsr/codes/dcm.h>
#include <dcmtk/dcmiod/cielabutil.h>
#include <dcmtk/dcmsr/codes/dcm.h>
#include <dcmtk/ofstd/ofmem.h>


namespace dcmqi {
Expand Down Expand Up @@ -495,6 +496,7 @@ namespace dcmqi {
cerr << "ERROR: Failed to load segmentation dataset! " << cond.text() << endl;
throw -1;
}
OFunique_ptr<DcmSegmentation> segdocguard(segdoc);

// Directions
FGInterface &fgInterface = segdoc->getFunctionalGroups();
Expand Down

0 comments on commit 52e9385

Please sign in to comment.