Fix NullPointerException if no report exist for this app

This commit is contained in:
Schoumi 2020-07-09 14:35:08 +02:00
parent b601aafce7
commit 34ae578836
1 changed files with 2 additions and 1 deletions

View File

@ -81,6 +81,7 @@ public class MainActivity extends AppCompatActivity {
model.report = DatabaseManager.getInstance(MainActivity.this).getReportFor(model.packageName, model.versionCode, model.source); model.report = DatabaseManager.getInstance(MainActivity.this).getReportFor(model.packageName, model.versionCode, model.source);
else else
model.report = DatabaseManager.getInstance(MainActivity.this).getReportFor(model.packageName,model.versionName,model.source); model.report = DatabaseManager.getInstance(MainActivity.this).getReportFor(model.packageName,model.versionName,model.source);
if(model.report != null)
model.trackers = DatabaseManager.getInstance(MainActivity.this).getTrackers(model.report.trackers); model.trackers = DatabaseManager.getInstance(MainActivity.this).getTrackers(model.report.trackers);
} }
updatable.onUpdateComplete(); updatable.onUpdateComplete();