Fix a crash

Signed-off-by: Mario Danic <mario@lovelyhq.com>
This commit is contained in:
Mario Danic 2018-06-04 21:33:55 +02:00
parent 91f38323e9
commit e79d25dc3f

View File

@ -839,9 +839,11 @@ public class ContactsController extends BaseController implements SearchView.OnQ
if (currentUser.hasSpreedCapabilityWithName("chat-v2")) { if (currentUser.hasSpreedCapabilityWithName("chat-v2")) {
bundle.putString(BundleKeys.KEY_CONVERSATION_NAME, bundle.putString(BundleKeys.KEY_CONVERSATION_NAME,
roomOverall.getOcs().getData().getDisplayName()); roomOverall.getOcs().getData().getDisplayName());
if (getParentController() != null) {
getParentController().getRouter().pushController((RouterTransaction.with(new ChatController(bundle)) getParentController().getRouter().pushController((RouterTransaction.with(new ChatController(bundle))
.pushChangeHandler(new HorizontalChangeHandler()) .pushChangeHandler(new HorizontalChangeHandler())
.popChangeHandler(new HorizontalChangeHandler()))); .popChangeHandler(new HorizontalChangeHandler())));
}
} else { } else {
startActivity(conversationIntent); startActivity(conversationIntent);
} }