diff --git a/CHANGELOG.md b/CHANGELOG.md index 736f937..b8426d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/haxelib.json b/haxelib.json index 5cea941..f2bdcd9 100644 --- a/haxelib.json +++ b/haxelib.json @@ -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" ], diff --git a/package-lock.json b/package-lock.json index 5859daf..03dbf14 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "haxe-instrument", - "version": "1.3.0", + "version": "1.3.1", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "haxe-instrument", - "version": "1.3.0", + "version": "1.3.1", "license": "MIT", "devDependencies": { "lix": "^15.12.4" diff --git a/package.json b/package.json index 4e19174..da685a9 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/instrument/coverage/Coverage.hx b/src/instrument/coverage/Coverage.hx index 75bbf84..b502067 100644 --- a/src/instrument/coverage/Coverage.hx +++ b/src/instrument/coverage/Coverage.hx @@ -34,7 +34,9 @@ class Coverage { * */ public static function resetAttributableCoverage() { - CoverageContext.coveredAttributable.clear(); + if (CoverageContext.coveredAttributable != null) { + CoverageContext.coveredAttributable.clear(); + } } /**