1
0
mirror of https://github.com/moparisthebest/Yaaic synced 2024-11-23 01:12:17 -05:00

ConversationActivity: Fixed a NullPointerException

This commit is contained in:
Sebastian Kaspari 2010-09-18 12:48:02 +02:00
parent a535d74a85
commit e136a56d7d

View File

@ -363,6 +363,13 @@ public class ConversationActivity extends Activity implements ServiceConnection,
public void onConversationMessage(String target) public void onConversationMessage(String target)
{ {
Conversation conversation = server.getConversation(target); Conversation conversation = server.getConversation(target);
if (conversation == null) {
// In an early state it can happen that the conversation object
// is not created yet.
return;
}
MessageListAdapter adapter = conversation.getMessageListAdapter(); MessageListAdapter adapter = conversation.getMessageListAdapter();
conversation.setStatus(Conversation.STATUS_MESSAGE); conversation.setStatus(Conversation.STATUS_MESSAGE);