Skip to content

Commit

Permalink
[vector_graphics_compiler] fix-null-exception
Browse files Browse the repository at this point in the history
  • Loading branch information
Enguerrand ARMINJON WINDOWS committed Nov 2, 2024
1 parent 2c8f226 commit feaf9a4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
4 changes: 4 additions & 0 deletions packages/vector_graphics_compiler/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 1.1.13

* Fixes an issue where empty tag could throw and broke SVG.

## 1.1.12

* Transfers the package source from https://github.com/dnfield/vector_graphics
Expand Down
5 changes: 4 additions & 1 deletion packages/vector_graphics_compiler/lib/src/svg/parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -895,7 +895,10 @@ class SvgParser {
return false;
}
final ParentNode parent = _parentDrawables.last.drawable;
final Path path = pathFunc(this)!;
final Path? path = pathFunc(this);
if (path == null) {
return false;
}
final PathNode drawable = PathNode(path, _currentAttributes);
checkForIri(drawable);

Expand Down
2 changes: 1 addition & 1 deletion packages/vector_graphics_compiler/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ issue_tracker: https://github.com/flutter/flutter/issues?q=is%3Aissue+is%3Aopen+
# See https://github.com/flutter/flutter/issues/157626 before publishing a new
# version.
publish_to: none
version: 1.1.12
version: 1.1.13

executables:
vector_graphics_compiler:
Expand Down

0 comments on commit feaf9a4

Please sign in to comment.