mirror of
https://github.com/oxen-io/session-android.git
synced 2024-12-24 00:37:47 +00:00
Merge pull request #2341 from mcginty/mms-recv-null-text
don't fail on null received text parts
This commit is contained in:
commit
9a31c5961a
@ -24,7 +24,11 @@ public class PartParser {
|
||||
if (characterSet.equals(CharacterSets.MIMENAME_ANY_CHARSET))
|
||||
characterSet = CharacterSets.MIMENAME_ISO_8859_1;
|
||||
|
||||
partText = new String(body.getPart(i).getData(), characterSet);
|
||||
if (body.getPart(i).getData() != null) {
|
||||
partText = new String(body.getPart(i).getData(), characterSet);
|
||||
} else {
|
||||
partText = "";
|
||||
}
|
||||
} catch (UnsupportedEncodingException e) {
|
||||
Log.w("PartParser", e);
|
||||
partText = "Unsupported Encoding!";
|
||||
|
Loading…
x
Reference in New Issue
Block a user