File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed
AndroidSDK/src/com/leanplum/internal Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -465,11 +465,14 @@ static int getResIdFromPath(String resPath) {
465465 private static void fileVariableFinish () {
466466 for (String name : new HashMap <>(vars ).keySet ()) {
467467 Var <?> var = vars .get (name );
468+ if (var == null ) {
469+ return ;
470+ }
468471 String overrideFile = var .stringValue ;
469- if (var .isResource && ( var . kind (). equals ( Constants .Kinds .FILE )) && overrideFile != null &&
470- ! var .defaultValue (). equals ( overrideFile )) {
472+ if (var .isResource && Constants .Kinds .FILE . equals ( var . kind ( )) && overrideFile != null &&
473+ ! overrideFile . equals ( var .defaultValue ())) {
471474 Map <String , Object > variationAttributes = CollectionUtil .uncheckedCast (fileAttributes .get
472- (overrideFile ));
475+ (overrideFile ));
473476 InputStream stream = fileStreams .get (overrideFile );
474477 if (variationAttributes != null && stream != null ) {
475478 var .setOverrideResId (getResIdFromPath (var .stringValue ()));
@@ -520,7 +523,7 @@ public static void applyVariableDiffs(
520523 String name = entry .getKey ();
521524 Map <String , Object > messageConfig = CollectionUtil .uncheckedCast (VarCache .messages .get
522525 (name ));
523- if (messageConfig .get ("action" ) != null ) {
526+ if (messageConfig != null && messageConfig .get ("action" ) != null ) {
524527 Map <String , Object > actionArgs =
525528 CollectionUtil .uncheckedCast (messageConfig .get (Constants .Keys .VARS ));
526529 new ActionContext (
You can’t perform that action at this time.
0 commit comments