Never store an address with an empty host

This commit is contained in:
Atlante45 2017-05-22 18:28:37 -07:00
parent e4a516dcbf
commit 05f69ade32

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 {