Crash fix

This commit is contained in:
DrKLO 2015-01-03 06:21:11 +03:00
parent 9c2ac64d14
commit 4e03bc1a75
2 changed files with 5 additions and 5 deletions

View File

@ -82,7 +82,7 @@ android {
defaultConfig { defaultConfig {
minSdkVersion 8 minSdkVersion 8
targetSdkVersion 21 targetSdkVersion 21
versionCode 413 versionCode 414
versionName "2.3.0" versionName "2.3.1"
} }
} }

View File

@ -1342,7 +1342,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
continue; continue;
} }
for (TLRPC.PhotoSize size2 : newMsg.media.photo.sizes) { for (TLRPC.PhotoSize size2 : newMsg.media.photo.sizes) {
if (size2.location.volume_id == Integer.MIN_VALUE && size.type.equals(size2.type) || size.w == size2.w && size.h == size2.h) { if (size2.location != null && size2.location.volume_id == Integer.MIN_VALUE && size.type.equals(size2.type) || size.w == size2.w && size.h == size2.h) {
String fileName = size2.location.volume_id + "_" + size2.location.local_id; String fileName = size2.location.volume_id + "_" + size2.location.local_id;
String fileName2 = size.location.volume_id + "_" + size.location.local_id; String fileName2 = size.location.volume_id + "_" + size.location.local_id;
if (fileName.equals(fileName2)) { if (fileName.equals(fileName2)) {
@ -1371,7 +1371,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
TLRPC.PhotoSize size2 = newMsg.media.video.thumb; TLRPC.PhotoSize size2 = newMsg.media.video.thumb;
TLRPC.PhotoSize size = sentMessage.media.video.thumb; TLRPC.PhotoSize size = sentMessage.media.video.thumb;
if (size2.location.volume_id == Integer.MIN_VALUE && size2.location != null && size.location != null && !(size instanceof TLRPC.TL_photoSizeEmpty) && !(size2 instanceof TLRPC.TL_photoSizeEmpty)) { if (size2.location != null && size2.location.volume_id == Integer.MIN_VALUE && size.location != null && !(size instanceof TLRPC.TL_photoSizeEmpty) && !(size2 instanceof TLRPC.TL_photoSizeEmpty)) {
String fileName = size2.location.volume_id + "_" + size2.location.local_id; String fileName = size2.location.volume_id + "_" + size2.location.local_id;
String fileName2 = size.location.volume_id + "_" + size.location.local_id; String fileName2 = size.location.volume_id + "_" + size.location.local_id;
if (!fileName.equals(fileName2)) { if (!fileName.equals(fileName2)) {
@ -1402,7 +1402,7 @@ public class SendMessagesHelper implements NotificationCenter.NotificationCenter
TLRPC.PhotoSize size2 = newMsg.media.document.thumb; TLRPC.PhotoSize size2 = newMsg.media.document.thumb;
TLRPC.PhotoSize size = sentMessage.media.document.thumb; TLRPC.PhotoSize size = sentMessage.media.document.thumb;
if (size2.location.volume_id == Integer.MIN_VALUE && size2.location != null && size.location != null && !(size instanceof TLRPC.TL_photoSizeEmpty) && !(size2 instanceof TLRPC.TL_photoSizeEmpty)) { if (size2.location != null && size2.location.volume_id == Integer.MIN_VALUE && size.location != null && !(size instanceof TLRPC.TL_photoSizeEmpty) && !(size2 instanceof TLRPC.TL_photoSizeEmpty)) {
String fileName = size2.location.volume_id + "_" + size2.location.local_id; String fileName = size2.location.volume_id + "_" + size2.location.local_id;
String fileName2 = size.location.volume_id + "_" + size.location.local_id; String fileName2 = size.location.volume_id + "_" + size.location.local_id;
if (!fileName.equals(fileName2)) { if (!fileName.equals(fileName2)) {