Add null check for package settings

A few lines down "ps" is run through a null check, so apparently there
could be some screwy system conditions where this is encountered. And,
in fact, this was encountered through an updated system pacakge that
managed to delete the package from /system/app during testing. It left
the PackageSetting in mDisabledSysPackages which would cause a deference
of a null variable.

Change-Id: Ic7faca569abd16a87a8a69c20df08c11a274a001
diff --git a/services/java/com/android/server/PackageManagerService.java b/services/java/com/android/server/PackageManagerService.java
index abf8b7c..387f458 100644
--- a/services/java/com/android/server/PackageManagerService.java
+++ b/services/java/com/android/server/PackageManagerService.java
@@ -2603,7 +2603,7 @@
         }
         // First check if this is a system package that may involve an update
         if (updatedPkg != null && (parseFlags&PackageParser.PARSE_IS_SYSTEM) != 0) {
-            if (!ps.codePath.equals(scanFile)) {
+            if (ps != null && !ps.codePath.equals(scanFile)) {
                 // The path has changed from what was last scanned...  check the
                 // version of the new path against what we have stored to determine
                 // what to do.