mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
Merge pull request #1968 from deltachat/adb-issue-1967
avoid NullPointerException in DcMsg.msgSetToIds()
This commit is contained in:
@@ -145,8 +145,10 @@ public class DcMsg {
|
||||
|
||||
// aliases and higher-level tools
|
||||
public static int[] msgSetToIds(final Set<DcMsg> dcMsgs) {
|
||||
int cnt = dcMsgs==null? 0 : dcMsgs.size();
|
||||
int[] ids = new int[cnt];
|
||||
if (dcMsgs == null) {
|
||||
return new int[0];
|
||||
}
|
||||
int[] ids = new int[dcMsgs.size()];
|
||||
int i = 0;
|
||||
for (DcMsg dcMsg : dcMsgs) {
|
||||
ids[i++] = dcMsg.getId();
|
||||
|
||||
Reference in New Issue
Block a user