Skip to content

Commit 7baec0f

Browse files
committed
Fix null pointer exception
Bug: 2718857 Change-Id: I4b04284fd5b3a4881297fe15555e9f1ca91d73cb
1 parent fa499e4 commit 7baec0f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

services/java/com/android/server/NetworkManagementService.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -504,8 +504,11 @@ public void startAccessPoint(WifiConfiguration wifiConfig, String wlanIface, Str
504504
}
505505

506506
private String convertQuotedString(String s) {
507-
/* Replace \ with \\, then " with \" and add quotes at end */
508-
return '"' + s.replaceAll("\\\\","\\\\\\\\").replaceAll("\"","\\\\\"") + '"';
507+
if (s == null) {
508+
return s;
509+
}
510+
/* Replace \ with \\, then " with \" and add quotes at end */
511+
return '"' + s.replaceAll("\\\\","\\\\\\\\").replaceAll("\"","\\\\\"") + '"';
509512
}
510513

511514
public void stopAccessPoint() throws IllegalStateException {

0 commit comments

Comments
 (0)