Skip to content

Commit

Permalink
Fix possible crash with null thread body.
Browse files Browse the repository at this point in the history
  • Loading branch information
greyson-signal committed Jun 7, 2020
1 parent 1234899 commit d33873d
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -56,6 +56,7 @@
import org.thoughtcrime.securesms.util.MediaUtil;
import org.thoughtcrime.securesms.util.SearchUtil;
import org.thoughtcrime.securesms.util.ThemeUtil;
import org.thoughtcrime.securesms.util.Util;
import org.thoughtcrime.securesms.util.ViewUtil;

import java.util.Collections;
Expand Down Expand Up @@ -446,7 +447,7 @@ private static SpannableString getThreadDisplayBody(@NonNull Context context, @N
} else if (extra != null && extra.isRemoteDelete()) {
return new SpannableString(emphasisAdded(context.getString(R.string.ThreadRecord_this_message_was_deleted)));
} else {
return new SpannableString(thread.getBody());
return new SpannableString(Util.emptyIfNull(thread.getBody()));
}
}
}
Expand Down

0 comments on commit d33873d

Please sign in to comment.