Merge pull request #10531 from Atlante45/fix/current-address

Never store an address with an empty host
This commit is contained in:
Brad Hefta-Gaub 2017-05-25 08:33:16 -07:00 committed by GitHub
commit ca87b792de

View file

@ -136,7 +136,13 @@ void AddressManager::goForward() {
}
void AddressManager::storeCurrentAddress() {
currentAddressHandle.set(currentAddress());
auto url = currentAddress();
if (!url.host().isEmpty()) {
currentAddressHandle.set(url);
} else {
qCWarning(networking) << "Ignoring attempt to save current address with an empty host" << url;
}
}
QString AddressManager::currentPath(bool withOrientation) const {