diff options
author | Christian Schneppe <christian@pix-art.de> | 2019-01-26 23:12:09 +0100 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2019-01-26 23:12:09 +0100 |
commit | 5cf82e9c8a0c225dbbc30ffe854c65d6e6871d08 (patch) | |
tree | 567cd4916d07f358a117428999332753d17e515b /src | |
parent | 439a61a75ab4a7d9792d2aac9f821588a2a2a07e (diff) |
fix crash on getting bookmarks
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java index ec9957b7c..8b88d849e 100644 --- a/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java +++ b/src/main/java/de/pixart/messenger/ui/ConferenceDetailsActivity.java @@ -332,11 +332,13 @@ public class ConferenceDetailsActivity extends XmppActivity implements OnConvers this.binding.mucEditSubject.addTextChangedListener(this); this.binding.mucEditSubject.addTextChangedListener(new StylingHelper.MessageEditorStyler(this.binding.mucEditSubject)); this.binding.autojoinCheckbox.setOnCheckedChangeListener((buttonView, isChecked) -> { - final Bookmark bookmark = mConversation.getBookmark(); - if (bookmark != null) { - bookmark.setAutojoin(this.binding.autojoinCheckbox.isChecked()); - xmppConnectionService.pushBookmarks(bookmark.getAccount()); - updateView(); + if (mConversation != null) { + final Bookmark bookmark = mConversation.getBookmark(); + if (bookmark != null) { + bookmark.setAutojoin(this.binding.autojoinCheckbox.isChecked()); + xmppConnectionService.pushBookmarks(bookmark.getAccount()); + updateView(); + } } }); mMediaAdapter = new MediaAdapter(this, R.dimen.media_size); |