Skip to content

Commit

Permalink
Prevent iterating null children. Fixes issue #146.
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-rosso committed Sep 4, 2019
1 parent 798ec8d commit 2c078c1
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
4 changes: 4 additions & 0 deletions flare_dart/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [1.4.6] - 2019-09-04 08:48:11

- Prevent iterating null children. Fixes issue #146.

## [1.4.5] - 2019-08-23 09:51:30

Small changes to fix warnings caught by the Dart static analyzer.
Expand Down
12 changes: 7 additions & 5 deletions flare_dart/lib/actor_node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,14 @@ class ActorNode extends ActorComponent {
return false;
}

for (ActorNode child in _children) {
if (cb(child) == false) {
return false;
}
if (_children != null) {
for (final ActorNode child in _children) {
if (cb(child) == false) {
return false;
}

child.eachChildRecursive(cb);
child.eachChildRecursive(cb);
}
}

return true;
Expand Down
2 changes: 1 addition & 1 deletion flare_dart/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flare_dart
description: Vector design and runtime animation.
version: 1.4.5
version: 1.4.6
author: "2Dimensions Team <[email protected]>"
homepage: https://github.com/2d-inc/Flare-Flutter
environment:
Expand Down
4 changes: 4 additions & 0 deletions flare_flutter/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## [1.5.8] - 2019-09-04 08:47:31

- Bump flare_dart dependency version to get fix for iterating null children. Issue #146.

## [1.5.7] - 2019-08-26 10:39:49

- Clip the artboard based on settings from Flare.
Expand Down
2 changes: 1 addition & 1 deletion flare_flutter/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flare_flutter
description: Vector design and runtime animation for Flutter.
version: 1.5.7
version: 1.5.8
author: "2Dimensions Team <[email protected]>"
homepage: https://github.com/2d-inc/Flare-Flutter
environment:
Expand Down

0 comments on commit 2c078c1

Please sign in to comment.