am 983faeed: Merge "Fix NPE" into jb-mr1-dev
* commit '983faeed0b8090e12d10a31624e1cf09ff30c20c':
Fix NPE
diff --git a/wifi/java/android/net/wifi/WifiManager.java b/wifi/java/android/net/wifi/WifiManager.java
index e913d10..b871cdc 100644
--- a/wifi/java/android/net/wifi/WifiManager.java
+++ b/wifi/java/android/net/wifi/WifiManager.java
@@ -1983,7 +1983,9 @@
protected void finalize() throws Throwable {
try {
- mHandler.getLooper().quit();
+ if (mHandler != null && mHandler.getLooper() != null) {
+ mHandler.getLooper().quit();
+ }
} finally {
super.finalize();
}