fix the bug of 'When there is no network interface to obtain or update weather cause the program to crash'