Skip to content

Commit

Permalink
Fixes NPE in LithoTooltipController
Browse files Browse the repository at this point in the history
Summary: Fixes NPE in LithoTooltipController

Reviewed By: zielinskimz

Differential Revision: D55633025

fbshipit-source-id: 1202a61dcf651ba101003e52d7d4bdc3ac7afc23
  • Loading branch information
adityasharat authored and facebook-github-bot committed Apr 2, 2024
1 parent d7c66c8 commit e03477f
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,15 @@ static void showTooltipOnHandle(
final Rect anchorBounds = componentHandleToBounds.get(handle);

if (handle == null || anchorBounds == null) {
final @Nullable Component component = componentContext.getComponentScope();
final String name = component != null ? component.getSimpleName() : "null";
ComponentsReporter.emitMessage(
ComponentsReporter.LogLevel.ERROR,
INVALID_HANDLE,
"Cannot find a component with handle "
+ handle
+ " to use as anchor.\nComponent: "
+ componentContext.getComponentScope().getSimpleName());
+ name);
return;
}

Expand Down

0 comments on commit e03477f

Please sign in to comment.