Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit fee6f2b3 authored by Chet Haase's avatar Chet Haase
Browse files

Fix NPE when setting new LayoutTransition

ViewGroup.setLayoutTransition() has logic to cancel a previously-running
transition and remove the ViewGroup's listener from that transition. However,
it is possible for the transition to be set to null on the ViewGroup on the
cancel() call, making the next call to remove the listener crash with an NPE.

The fix is to use a temporary variable to hold the old reference and
not depend on the class instance variable remaining valid/non-null across
the call to cancel().

Issue #10488932 Hangout NPE in ViewGroup.setLayoutTransition on initiating a new conversation
Issue #10509201 ViewGroup.setLayoutTransition(null) causes crash when being called in LayoutTransition.TransitionListener.endTransition()

Change-Id: I7c181b79e6601024c93a8dc246d32b751f78b216
parent f8388885
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment