diff --git a/src/platforms/windows/windowsHandler.cpp b/src/platforms/windows/windowsHandler.cpp index ae4069de..d4027801 100644 --- a/src/platforms/windows/windowsHandler.cpp +++ b/src/platforms/windows/windowsHandler.cpp @@ -245,7 +245,7 @@ const vmime::string windowsHandler::getHostName() const { for (struct addrinfo* p = info ; p != NULL ; p = p->ai_next) { - if (isFQDN(p->ai_canonname)) + if (p->ai_canonname && isFQDN(p->ai_canonname)) { const string ret(p->ai_canonname); freeaddrinfo(info);