Skip to content

Commit

Permalink
fixed null reference when resetting attributable coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexHaxe committed Jan 7, 2025
1 parent 5e81ddc commit 26308e2
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## dev branch / next version (1.x.x)

## version 1.3.1 (2025-01-07)

- fixed null reference when resetting attributable coverage for a zero coverage file

## version 1.3.0 (2025-01-07)

- added support for attributable coverage
Expand Down
4 changes: 2 additions & 2 deletions haxelib.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
"profiler"
],
"description": "a profiling and coverage library for Haxe",
"version": "1.3.0",
"releasenote": "added support for attributable coverage - see CHANGELOG",
"version": "1.3.1",
"releasenote": "fixed null reference when resetting attributable coverage - see CHANGELOG",
"contributors": [
"AlexHaxe"
],
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "haxe-instrument",
"version": "1.3.0",
"version": "1.3.1",
"description": "a profiling and coverage library for Haxe",
"author": {
"name": "Alexander Blum",
Expand Down
4 changes: 3 additions & 1 deletion src/instrument/coverage/Coverage.hx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ class Coverage {
*
*/
public static function resetAttributableCoverage() {
CoverageContext.coveredAttributable.clear();
if (CoverageContext.coveredAttributable != null) {
CoverageContext.coveredAttributable.clear();
}
}

/**
Expand Down

0 comments on commit 26308e2

Please sign in to comment.