fix npe when layout xml search path does not exist
This commit is contained in:
committed by
Yan Zhulanow
parent
d5565db488
commit
afee95a37c
+1
@@ -35,6 +35,7 @@ class AndroidUIXmlParser(val project: Project?, val searchPaths: Collection<File
|
|||||||
if (paths == null) return ArrayList(0)
|
if (paths == null) return ArrayList(0)
|
||||||
val res = ArrayList<File>()
|
val res = ArrayList<File>()
|
||||||
for (path in paths) {
|
for (path in paths) {
|
||||||
|
if (!path.exists()) continue;
|
||||||
if (path.isFile() && isAndroidUIXml(path)) {
|
if (path.isFile() && isAndroidUIXml(path)) {
|
||||||
res.add(path)
|
res.add(path)
|
||||||
} else if (path.isDirectory()) {
|
} else if (path.isDirectory()) {
|
||||||
|
|||||||
Reference in New Issue
Block a user