From f2c6877b91963878f36ec42f5f865427bc69488c Mon Sep 17 00:00:00 2001 From: Valentin Shergin Date: Thu, 12 Oct 2017 09:41:26 -0700 Subject: [PATCH] Fixed crash on attempt to update local data of deallocated shadow node Summary: Trivial. That's okay that sometimes shadowNodes and views hierarchies have lack of synchonization. Reviewed By: sahrens Differential Revision: D6040022 fbshipit-source-id: 6b49a82317b620b66a87441719fddcafb1f27934 --- .../java/com/facebook/react/uimanager/UIImplementation.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java index 608187ff6d6017..f009512772a024 100644 --- a/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java +++ b/ReactAndroid/src/main/java/com/facebook/react/uimanager/UIImplementation.java @@ -243,8 +243,10 @@ public void setViewLocalData(int tag, Object data) { ReactShadowNode shadowNode = mShadowNodeRegistry.getNode(tag); if (shadowNode == null) { - throw new IllegalViewOperationException( - "Trying to set local data for view with unknown tag: " + tag); + FLog.w( + ReactConstants.TAG, + "Attempt to set local data for view with unknown tag: " + tag); + return; } shadowNode.setLocalData(data);