Fix potential NPE

Test: treehugger
Bug: 152712039
Change-Id: I22b17976a4c1e68f3bf076b7e40f84186e664e7b
This commit is contained in:
Mady Mellor
2020-03-31 16:08:16 -07:00
parent 89f012524f
commit 3e1addffe0

View File

@@ -1440,7 +1440,7 @@ public class BubbleStackView extends FrameLayout {
/** Expands the clicked bubble. */
public void expandBubble(Bubble bubble) {
if (bubble.equals(mBubbleData.getSelectedBubble())) {
if (bubble != null && bubble.equals(mBubbleData.getSelectedBubble())) {
// If the bubble we're supposed to expand is the selected bubble, that means the
// overflow bubble is currently expanded. Don't tell BubbleData to set this bubble as
// selected, since it already is. Just call the stack's setSelectedBubble to expand it.