CB-9879 getCookies can cause unhandled NullPointerException

Added extra check for CookieManager instance (null pointer on Crosswalk/Android < 4.4)

github: close #107
This commit is contained in:
Jeroen Verhoest
2015-10-26 10:02:37 +01:00
committed by daserge
parent 189942284a
commit cdeec1c59f
+1 -1
View File
@@ -256,7 +256,7 @@ public class FileTransfer extends CordovaPlugin {
} catch (ClassCastException e) {
}
if (!gotCookie) {
if (!gotCookie && CookieManager.getInstance() != null) {
cookie = CookieManager.getInstance().getCookie(target);
}