Fix edge case NPE when the user hits the back button very rapidly during state restoration (#674)

This commit is contained in:
Eric Kuck
2022-06-14 10:12:44 -05:00
committed by GitHub
parent d32fc813d0
commit 5f04d9de89
@@ -742,6 +742,7 @@ public abstract class Router {
@Override
public void run() {
containerFullyAttached = true;
performPendingControllerChanges();
}
});
}
@@ -861,12 +862,14 @@ public abstract class Router {
to.setNeedsAttach(true);
}
pendingControllerChanges.add(transaction);
container.post(new Runnable() {
@Override
public void run() {
performPendingControllerChanges();
}
});
if (container != null) {
container.post(new Runnable() {
@Override
public void run() {
performPendingControllerChanges();
}
});
}
} else {
ControllerChangeHandler.executeChange(transaction);
}