From 0a93093bc7c0bbd2bf98da799a3d6724dae2bf02 Mon Sep 17 00:00:00 2001 From: iNPUTmice Date: Mon, 6 Oct 2014 19:27:58 +0200 Subject: fixed npe --- src/eu/siacs/conversations/ui/ConversationActivity.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/eu/siacs/conversations/ui/ConversationActivity.java b/src/eu/siacs/conversations/ui/ConversationActivity.java index 1f2747f7..f94d6b73 100644 --- a/src/eu/siacs/conversations/ui/ConversationActivity.java +++ b/src/eu/siacs/conversations/ui/ConversationActivity.java @@ -669,8 +669,11 @@ public class ConversationActivity extends XmppActivity implements @Override public void onSaveInstanceState(Bundle savedInstanceState) { - savedInstanceState.putString(STATE_OPEN_CONVERSATION, - getSelectedConversation().getUuid()); + Conversation conversation = getSelectedConversation(); + if (conversation!=null) { + savedInstanceState.putString(STATE_OPEN_CONVERSATION, + conversation.getUuid()); + } savedInstanceState.putBoolean(STATE_PANEL_OPEN, isConversationsOverviewVisable()); super.onSaveInstanceState(savedInstanceState); -- cgit v1.2.3