|
@@ -556,14 +556,16 @@ public class ContactsController extends BaseController implements SearchView.OnQ
|
|
|
|
|
|
@Override
|
|
|
public void onNext(RoomOverall roomOverall) {
|
|
|
- overridePushHandler(new NoOpControllerChangeHandler());
|
|
|
- overridePopHandler(new NoOpControllerChangeHandler());
|
|
|
- Intent callIntent = new Intent(getActivity(), CallActivity.class);
|
|
|
- Bundle bundle = new Bundle();
|
|
|
- bundle.putString(BundleKeys.KEY_ROOM_TOKEN, roomOverall.getOcs().getData().getToken());
|
|
|
- bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(userEntity));
|
|
|
- callIntent.putExtras(bundle);
|
|
|
- startActivity(callIntent);
|
|
|
+ if (getActivity() != null) {
|
|
|
+ overridePushHandler(new NoOpControllerChangeHandler());
|
|
|
+ overridePopHandler(new NoOpControllerChangeHandler());
|
|
|
+ Intent callIntent = new Intent(getActivity(), CallActivity.class);
|
|
|
+ Bundle bundle = new Bundle();
|
|
|
+ bundle.putString(BundleKeys.KEY_ROOM_TOKEN, roomOverall.getOcs().getData().getToken());
|
|
|
+ bundle.putParcelable(BundleKeys.KEY_USER_ENTITY, Parcels.wrap(userEntity));
|
|
|
+ callIntent.putExtras(bundle);
|
|
|
+ startActivity(callIntent);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
@Override
|