Merge pull request #1147 from daleglass/fix-null-pointer-arithmetic-warning

Fix warning: NULL used in arithmetic
This commit is contained in:
Kalila 2021-04-02 16:24:26 -04:00 committed by GitHub
commit 286976addb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1545,9 +1545,9 @@ void DomainServer::sendHeartbeatToMetaverse(const QString& networkAddress, const
static const QString PORT_SETTINGS_KEY = "domain_server." + PUBLIC_SOCKET_PORT_KEY;
const int portFromSettings = _settingsManager.valueForKeyPath(PORT_SETTINGS_KEY).toInt();
if (port != NULL) {
if (port != 0) {
domainObject[PUBLIC_SOCKET_PORT_KEY] = port;
} else if (portFromSettings != NULL) {
} else if (portFromSettings != 0) {
domainObject[PUBLIC_SOCKET_PORT_KEY] = portFromSettings;
}