Merge "Fix null pointer exception" into froyo
diff --git a/services/java/com/android/server/NetworkManagementService.java b/services/java/com/android/server/NetworkManagementService.java
index 5e0439c..cbbc7be 100644
--- a/services/java/com/android/server/NetworkManagementService.java
+++ b/services/java/com/android/server/NetworkManagementService.java
@@ -504,8 +504,11 @@
     }
 
     private String convertQuotedString(String s) {
-      /* Replace \ with \\, then " with \" and add quotes at end */
-      return '"' + s.replaceAll("\\\\","\\\\\\\\").replaceAll("\"","\\\\\"") + '"';
+        if (s == null) {
+            return s;
+        }
+        /* Replace \ with \\, then " with \" and add quotes at end */
+        return '"' + s.replaceAll("\\\\","\\\\\\\\").replaceAll("\"","\\\\\"") + '"';
     }
 
     public void stopAccessPoint() throws IllegalStateException {