From b41017ce934336782a39ce0dd9c4d22d585c55df Mon Sep 17 00:00:00 2001 From: Sebastian Kaspari Date: Sat, 20 Mar 2010 15:44:34 +0100 Subject: [PATCH] Only update message list adapter on resume if existing --- src/org/yaaic/view/ConversationActivity.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/org/yaaic/view/ConversationActivity.java b/src/org/yaaic/view/ConversationActivity.java index c49671a..200ed45 100644 --- a/src/org/yaaic/view/ConversationActivity.java +++ b/src/org/yaaic/view/ConversationActivity.java @@ -140,7 +140,9 @@ public class ConversationActivity extends Activity implements ServiceConnection, // Fill view with messages that have been buffered while paused for (Conversation conversation : server.getConversations()) { while (conversation.hasBufferedMessages()) { - conversation.getMessageListAdapter().addMessage(conversation.pollBufferedMessage()); + if (conversation.getMessageListAdapter() != null) { + conversation.getMessageListAdapter().addMessage(conversation.pollBufferedMessage()); + } } } }