Freeze gameTree when the database is empty.

Fix the bug that makes the program freeze when the user click the “All game" in the tree with no game in it.

Reported-by: hlong290494
Signed-off by: Long Nguyen Duc Hoang <lhnguyenduc@wpi.edu>