Fix:Crash when inputted an invalid URL

Fixed the crash issue when inputted an invalid URL.