fixed some NPE

This commit is contained in:
Daniel Gultsch 2019-05-22 23:58:39 +02:00
parent e5378df39c
commit 9a8cc5b2e7
2 changed files with 9 additions and 1 deletions

View File

@ -436,6 +436,9 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers
private void updateView() {
invalidateOptionsMenu();
if (mConversation == null) {
return;
}
final MucOptions mucOptions = mConversation.getMucOptions();
final User self = mucOptions.getSelf();
String account;

View File

@ -2606,7 +2606,12 @@ public class ConversationFragment extends XmppFragment implements EditMessage.Ke
service.sendChatState(conversation);
}
if (storeNextMessage()) {
runOnUiThread(() -> activity.onConversationsListItemUpdated());
runOnUiThread(() -> {
if (activity == null) {
return;
}
activity.onConversationsListItemUpdated();
});
}
runOnUiThread(this::updateSendButton);
}