24
inverce
8y

#1 GoogleMap map = null;
#2 map.clear();

I'm used to bad code, since i'm responsible for code review of acadamic projects. But when i saw that one and last year students saying they dont know the reason, i died a bit inside

Comments
  • 1
    so "map" is null and they try to call "clear()" on that. How could they not find this, while testing and debugging.
  • 3
    yep,

    "Our app crashes on start and we can't find the reason",

    with attached logcat crash :)
  • 0
    Oh wow.. This is why many people despise the presence of null reference. It's far too easy to make mistakes with 'em.
Add Comment