Skip to content

Commit

Permalink
Fix #4284 NPE for getZone (#4289)
Browse files Browse the repository at this point in the history
  • Loading branch information
ajaaym authored Jan 4, 2019
1 parent 6d56b8c commit ca7054e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public static String getProjectId() {

public static String getZone() {
String zoneId = getAttribute("instance/zone");
if (zoneId.contains("/")) {
if (zoneId != null && zoneId.contains("/")) {
return zoneId.substring(zoneId.lastIndexOf('/') + 1);
}
return zoneId;
Expand Down

0 comments on commit ca7054e

Please sign in to comment.