Skip to content

Commit

Permalink
Check for null children before iterating for initialization.
Browse files Browse the repository at this point in the history
  • Loading branch information
luigi-rosso committed Jul 6, 2019
1 parent a17469b commit 15682ac
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions flare_flutter/lib/flare.dart
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,12 @@ class FlutterActorShape extends ActorShape with FlutterActorDrawable {
void initializeGraphics() {
super.initializeGraphics();
_path = ui.Path();
for (final ActorNode node in children) {
FlutterPath flutterPath = node as FlutterPath;
if (flutterPath != null) {
flutterPath.initializeGraphics();
if (children != null) {
for (final ActorNode node in children) {
FlutterPath flutterPath = node as FlutterPath;
if (flutterPath != null) {
flutterPath.initializeGraphics();
}
}
}
}
Expand Down

0 comments on commit 15682ac

Please sign in to comment.