crach fix

crash when exit whitout a open connection or gps listener