Bug 432 - java.lang.NullPointerException was thrown when clearing empty rank list.
Summary: java.lang.NullPointerException was thrown when clearing empty rank list.
Status: RESOLVED FIXED
Alias: None
Product: Group16_Tetris Fighter
Classification: Unclassified
Component: GameSaver (show other bugs)
Version: V2
Hardware: PC Mac OS
: --- enhancement
Assignee: Ashley
URL:
Depends on:
Blocks:
 
Reported: 2020-11-22 15:38 HKT by Ashley
Modified: 2020-11-24 22:36 HKT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ashley 2020-11-22 15:38:46 HKT
java.lang.NullPointerException was thrown when clearing the empty rank list.

This bug is caused by careless design.

To fix this bug, we simply add the following code:

 if(list!=null)
     list.clear();