simulator: fix exit issue when close RTGUI window