Skip to content

Commit

Permalink
Only access renderObject if hasSize is true
Browse files Browse the repository at this point in the history
  • Loading branch information
denrase committed Sep 2, 2024
1 parent 3356741 commit 5ff7aa9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flutter/lib/src/view_hierarchy/sentry_tree_walker.dart
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,7 @@ class _TreeWalker {
double? alpha;

final renderObject = element.renderObject;
if (renderObject is RenderBox) {
if (renderObject is RenderBox && renderObject.hasSize) {
final offset = renderObject.localToGlobal(Offset.zero);
if (offset.dx > 0) {
x = offset.dx;
Expand Down

0 comments on commit 5ff7aa9

Please sign in to comment.