Merge "Fix NPE when runnin testActivity" into nyc-dev

This commit is contained in:
Diego Perez
2016-04-07 19:02:33 +00:00
committed by Android (Google) Code Review

View File

@@ -639,7 +639,8 @@ public final class BridgeContext extends Context {
}
// Add value to defaultPropsMap if needed
if (typeArrayAndPropertiesPair.getSecond() != null) {
Object key = getCurrentParser().getViewCookie();
BridgeXmlBlockParser parser = getCurrentParser();
Object key = parser != null ? parser.getViewCookie() : null;
if (key != null) {
PropertiesMap defaultPropMap = mDefaultPropMaps.get(key);
if (defaultPropMap == null) {