Quantcast
Channel: Active questions tagged crash - Stack Overflow
Viewing all articles
Browse latest Browse all 7199

Crash null object reference on non-null variable kotlin

$
0
0

Attempt to invoke interface method 'int java.util.List.size()' on a null object reference

I have class

data class facility(movies: List<Movie>)

I already checked with :

facility.movies = database.movies?.map{Movie(it)} ?: listOf()

Somehow in implementation I got crash on crashlytics when I call

movies.size()

Addidition :crash was happen on Samsung Galaxy A50s Android 10


Viewing all articles
Browse latest Browse all 7199

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>