Skip to content

Commit 4b8dbed

Browse files
committed
Merge branch 'fix_gzip' of https://github.com/BenLangmead/bowtie into fix_gzip
2 parents e168ad4 + c45335b commit 4b8dbed

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

hit.h

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,8 @@ class HitSink {
174174
nthreads_((nthreads > 0) ? nthreads : 1),
175175
ptBufs_(),
176176
ptCounts_(nthreads_),
177-
perThreadBufSize_(perThreadBufSize)
177+
perThreadBufSize_(perThreadBufSize),
178+
ptNumAligned_(NULL)
178179
{
179180
size_t nelt = 5 * nthreads_;
180181
ptNumAligned_ = new uint64_t[nelt];
@@ -218,7 +219,8 @@ class HitSink {
218219
sampleMax_(sampleMax),
219220
quiet_(false),
220221
nthreads_(0),
221-
perThreadBufSize_(0)
222+
perThreadBufSize_(0),
223+
ptNumAligned_(NULL)
222224
{
223225
// Open all files for writing and initialize all locks
224226
for(size_t i = 0; i < numOuts; i++) {
@@ -232,8 +234,10 @@ class HitSink {
232234
* Destroy HitSinkobject;
233235
*/
234236
virtual ~HitSink() {
235-
delete ptNumAligned_;
236-
ptNumAligned_ = NULL;
237+
if(ptNumAligned_ != NULL) {
238+
delete ptNumAligned_;
239+
ptNumAligned_ = NULL;
240+
}
237241
closeOuts();
238242
if(_deleteOuts) {
239243
// Delete all non-NULL output streams

0 commit comments

Comments
 (0)