Project

General

Profile

« Previous | Next » 

Revision c020555e

Added by Leszek Koltunski almost 2 years ago

Do not crash when something's wrong with the JSON file - handle this gracefully, do not change the object then, and report this to Firebase.

View differences:

src/main/java/org/distorted/bandaged/BandagedCreatorActivity.java
292 292
        SharedPreferences preferences = PreferenceManager.getDefaultSharedPreferences(this);
293 293
        SharedPreferences.Editor editor = preferences.edit();
294 294
        TwistyObject object = new TwistyJson( jsonStream, meshState, iconMode, null, null, 1.0f, null);
295
        object.removePreferences(editor);
295
        if( !object.getError() ) object.removePreferences(editor);
296 296
        editor.apply();
297 297
        }
298 298

  

Also available in: Unified diff