diff --git a/conductor/src/main/java/com/bluelinelabs/conductor/Router.java b/conductor/src/main/java/com/bluelinelabs/conductor/Router.java index 1ed44d1e..50ffb301 100644 --- a/conductor/src/main/java/com/bluelinelabs/conductor/Router.java +++ b/conductor/src/main/java/com/bluelinelabs/conductor/Router.java @@ -742,6 +742,7 @@ void watchContainerAttach() { @Override public void run() { containerFullyAttached = true; + performPendingControllerChanges(); } }); } @@ -861,12 +862,14 @@ private void performControllerChange(@Nullable final Controller to, @Nullable fi 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); }