diff --git a/src/common/fs_inet.cpp b/src/common/fs_inet.cpp index 23f23fd010..b32aa26950 100644 --- a/src/common/fs_inet.cpp +++ b/src/common/fs_inet.cpp @@ -105,7 +105,6 @@ wxFSFile* wxInternetFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), if (url.GetError() == wxURL_NOERR) { wxInputStream *s = url.GetInputStream(); - wxString content = url.GetProtocol().GetContentType(); if (s) { wxString tmpfile = @@ -120,6 +119,7 @@ wxFSFile* wxInternetFSHandler::OpenFile(wxFileSystem& WXUNUSED(fs), // Content-Type header, as defined by the RFC 2045, has the form of // "type/subtype" optionally followed by (multiple) "; parameter" // and we need just the MIME type here. + const wxString& content = url.GetProtocol().GetContentType(); wxString mimetype = content.BeforeFirst(';'); mimetype.Trim();