aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2014-05-15 10:27:36 +0200
committerDaniel Gultsch <daniel@gultsch.de>2014-05-15 10:27:36 +0200
commit13d73a196ca1482a0556bddb2e7c5df8f8c65e54 (patch)
treec5b00894929dc158f17dd7e7012b9299f261a19a
parentca7e24c30d74395fdf4007cad90733e7ec5db85a (diff)
fixed npe
Diffstat (limited to '')
-rw-r--r--src/eu/siacs/conversations/ui/ConversationFragment.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/eu/siacs/conversations/ui/ConversationFragment.java b/src/eu/siacs/conversations/ui/ConversationFragment.java
index 8d29ce8b..708c7f68 100644
--- a/src/eu/siacs/conversations/ui/ConversationFragment.java
+++ b/src/eu/siacs/conversations/ui/ConversationFragment.java
@@ -5,12 +5,9 @@ import java.util.HashMap;
import java.util.List;
import java.util.Set;
-import org.openintents.openpgp.OpenPgpError;
-
import net.java.otr4j.session.SessionStatus;
import eu.siacs.conversations.R;
import eu.siacs.conversations.crypto.PgpEngine;
-import eu.siacs.conversations.entities.Account;
import eu.siacs.conversations.entities.Contact;
import eu.siacs.conversations.entities.Conversation;
import eu.siacs.conversations.entities.Message;
@@ -31,7 +28,6 @@ import android.content.SharedPreferences;
import android.content.IntentSender.SendIntentException;
import android.graphics.Bitmap;
import android.graphics.Typeface;
-import android.net.Uri;
import android.os.Bundle;
import android.preference.PreferenceManager;
import android.text.Editable;
@@ -267,7 +263,9 @@ public class ConversationFragment extends Fragment {
}
private void displayInfoMessage(ViewHolder viewHolder, int r) {
- viewHolder.download_button.setVisibility(View.GONE);
+ if (viewHolder.download_button!=null) {
+ viewHolder.download_button.setVisibility(View.GONE);
+ }
viewHolder.image.setVisibility(View.GONE);
viewHolder.messageBody.setVisibility(View.VISIBLE);
viewHolder.messageBody.setText(getString(r));