diff options
Diffstat (limited to 'src/de/gultsch/chat/ui/ConversationFragment.java')
-rw-r--r-- | src/de/gultsch/chat/ui/ConversationFragment.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/de/gultsch/chat/ui/ConversationFragment.java b/src/de/gultsch/chat/ui/ConversationFragment.java index d6398c82..990c38b6 100644 --- a/src/de/gultsch/chat/ui/ConversationFragment.java +++ b/src/de/gultsch/chat/ui/ConversationFragment.java @@ -124,8 +124,11 @@ public class ConversationFragment extends Fragment { } else { imageView.setImageURI(profilePicture); } - ((TextView) view.findViewById(R.id.message_body)).setText(item - .getBody().trim()); + TextView messageBody = (TextView) view.findViewById(R.id.message_body); + String body = item.getBody(); + if (body!=null) { + messageBody.setText(body.trim()); + } TextView time = (TextView) view.findViewById(R.id.message_time); if (item.getStatus() == Message.STATUS_UNSEND) { time.setTypeface(null, Typeface.ITALIC); |