Merge "Fix panic when missing hiddenapi jar" am: f5df780fc2
am: f5a8e0e88d

Change-Id: Id434ff90e8e23a84d751ce1dfb5ec674b3434333
diff --git a/java/hiddenapi_singleton.go b/java/hiddenapi_singleton.go
index 139114b..9627dc6 100644
--- a/java/hiddenapi_singleton.go
+++ b/java/hiddenapi_singleton.go
@@ -159,9 +159,9 @@
 	for moduleList, pathList := range moduleListToPathList {
 		for i := range pathList {
 			if pathList[i] == nil {
+				pathList[i] = android.PathForOutput(ctx, "missing")
 				if ctx.Config().AllowMissingDependencies() {
 					missingDeps = append(missingDeps, (*moduleList)[i])
-					pathList[i] = android.PathForOutput(ctx, "missing")
 				} else {
 					ctx.Errorf("failed to find dex jar path for module %q",
 						(*moduleList)[i])