Fixed a null pointer exception after canceled file selection