NPE fix in SyncStorageEngine

Null check while reading malformed authorities
from xml file.

Bug: 26513719
Change-Id: I3bfb718bbc84b27ddd98f7941c3ca2e356d27ec0
This commit is contained in:
Shreyas Basarge
2016-01-13 14:27:16 +00:00
parent 198ce1a5e6
commit 11cb4e2209

View File

@@ -1903,8 +1903,10 @@ public class SyncStorageEngine extends Handler {
if ("authority".equals(tagName)) {
authority = parseAuthority(parser, version);
periodicSync = null;
if (authority.ident > highestAuthorityId) {
highestAuthorityId = authority.ident;
if (authority != null) {
if (authority.ident > highestAuthorityId) {
highestAuthorityId = authority.ident;
}
}
} else if (XML_TAG_LISTEN_FOR_TICKLES.equals(tagName)) {
parseListenForTickles(parser);