Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[Bug Fixing] avoid crash when getFlatUIContext() return null (#2007)
Browse files Browse the repository at this point in the history
* [Bug Fixing] avoid crash

* update coding style
  • Loading branch information
fred-ye authored and YorkShen committed Jan 7, 2019
1 parent f8b464c commit 871401a
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,11 @@ protected WXFrameLayout initComponentHostView(@NonNull Context context) {

@Override
public boolean promoteToView(boolean checkAncestor) {
return !intendToBeFlatContainer() ||
if (null != getInstance().getFlatUIContext()) {
return !intendToBeFlatContainer() ||
getInstance().getFlatUIContext().promoteToView(this, checkAncestor, WXDiv.class);
}
return false;
}

/**
Expand Down

0 comments on commit 871401a

Please sign in to comment.