MrCrayfish / ModelCreator

A program to create JSON models for blocks
Other
121 stars 64 forks source link

Null-checks added. #93

Closed ghost closed 8 years ago

ghost commented 8 years ago
ghost commented 8 years ago

If 'prefs' is null, a NullPointerException might occur when trying to get data from the 'prefs' reference.

Correct me if I am wrong, still learning haha :)

MrCrayfish commented 8 years ago

Think about it, prefs could either be an instance or null. Why do we need a second check when we already know and can simply return prefs. I'm struggling to make this simpler than @KnightMiner did already.

ghost commented 8 years ago

@MrCrayFish, Oh okay. We have different idea's of goals I see. But that's always nice to see. Simplified and useful, great :)