Skip to content

Commit

Permalink
Fix nullprt
Browse files Browse the repository at this point in the history
  • Loading branch information
FBlackBox committed Mar 7, 2022
1 parent b810dbc commit 7ed546f
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ public XmlResourceParser getParser(Context context, ServiceInfo serviceInfo, Str
int xmlId = meta.getInt(name);
if (xmlId != 0) {
try {
return getResources(context, serviceInfo.applicationInfo).getXml(xmlId);
Resources resources = getResources(context, serviceInfo.applicationInfo);
if (resources == null)
return null;
return resources.getXml(xmlId);
} catch (Exception e) {
e.printStackTrace();
}
Expand Down

0 comments on commit 7ed546f

Please sign in to comment.