mirror of https://github.com/odrling/Aegisub
Add a null-pointer check to update checker. Updates #1164.
Originally committed to SVN as r4383.
This commit is contained in:
parent
db3c67cfaf
commit
0fe2071082
|
@ -343,6 +343,8 @@ void AegisubVersionCheckerThread::DoCheck()
|
|||
throw VersionCheckError(STD_STR(_("Could not connect to updates server.")));
|
||||
|
||||
std::auto_ptr<wxInputStream> stream(http.GetInputStream(path));
|
||||
if (stream.get() == 0) // check for null-pointer
|
||||
throw VersionCheckError(_("Could not connect to updates server."));
|
||||
|
||||
if (http.GetResponse() < 200 || http.GetResponse() >= 300) {
|
||||
const std::string str_err = STD_STR(wxString::Format(_("HTTP request failed, got HTTP response %d."), http.GetResponse()));
|
||||
|
|
Loading…
Reference in New Issue