udacity / ud851-Sunshine

Apache License 2.0
2k stars 4.51k forks source link

Potential NPE, since cursor is not checked for 'null' #196

Open angrypacman opened 5 years ago

angrypacman commented 5 years ago

if cursor == null then app will crash with NPE https://github.com/udacity/ud851-Sunshine/blob/dbd998b89b78afac6c744ad92f14c7ba5eaf7531/S10.02-Solution-SmarterSyncing/app/src/main/java/com/example/android/sunshine/sync/SunshineSyncUtils.java#L103

https://github.com/udacity/ud851-Sunshine/blob/dbd998b89b78afac6c744ad92f14c7ba5eaf7531/S10.03-Solution-FirebaseJobDispatcher/app/src/main/java/com/example/android/sunshine/sync/SunshineSyncUtils.java#L178

and all the subsequent exercises and solutions