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
1 changed files with 5 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue