Skip to content

Commit

Permalink
Merge pull request #488 from ghuls/closest_fix_segfault_on_empty_b_file
Browse files Browse the repository at this point in the history
Bugfix bedtools closest: Do not segfault when b file is empty.
  • Loading branch information
arq5x committed Feb 21, 2017
2 parents cbba23a + fb07f36 commit 57b7f2c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/utils/RecordOutputMgr/RecordOutputMgr.cpp
Expand Up @@ -510,8 +510,10 @@ void RecordOutputMgr::null(bool queryType, bool dbType)
default:
break;
}
dummyRecord->printNull(_outBuf);
delete dummyRecord;
if (dummyRecord) {
dummyRecord->printNull(_outBuf);
delete dummyRecord;
}
}

void RecordOutputMgr::printKey(const Record *key, const string & start, const string & end)
Expand Down

0 comments on commit 57b7f2c

Please sign in to comment.