aboutsummaryrefslogtreecommitdiffstats
path: root/src/de/gultsch/chat/ui/ConversationFragment.java
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/de/gultsch/chat/ui/ConversationFragment.java18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/de/gultsch/chat/ui/ConversationFragment.java b/src/de/gultsch/chat/ui/ConversationFragment.java
index 1770e7bd..b3a6ad77 100644
--- a/src/de/gultsch/chat/ui/ConversationFragment.java
+++ b/src/de/gultsch/chat/ui/ConversationFragment.java
@@ -232,18 +232,20 @@ public class ConversationFragment extends Fragment {
boolean showPhoneSelfContactPicture = sharedPref.getBoolean(
"show_phone_selfcontact_picture", true);
- Bitmap self;
+ Bitmap self = null;
if (showPhoneSelfContactPicture) {
Uri selfiUri = PhoneHelper.getSefliUri(getActivity());
- try {
- self = BitmapFactory.decodeStream(getActivity()
- .getContentResolver().openInputStream(selfiUri));
- } catch (FileNotFoundException e) {
- self = UIHelper.getUnknownContactPicture(conversation
- .getAccount().getJid(), 200);
+ if (selfiUri!=null) {
+ try {
+ self = BitmapFactory.decodeStream(getActivity()
+ .getContentResolver().openInputStream(selfiUri));
+ } catch (FileNotFoundException e) {
+ self = null;
+ }
}
- } else {
+ }
+ if (self==null){
self = UIHelper.getUnknownContactPicture(conversation.getAccount()
.getJid(), 200);
}