[mainwindow] Fixed implicit conversion from shared_ptr to bool in return statement (gcc 4.7.2 complains)