Browse code

w32 fix

git-svn: trunk@2364

Tomasz Kojm authored on 2006/10/10 06:32:22
Showing 1 changed files
... ...
@@ -154,7 +154,7 @@ char *txtquery(const char *domain, unsigned int *ttl)
154 154
    if(DnsQuery_UTF8(domain, DNS_TYPE_TEXT, DNS_QUERY_TREAT_AS_FQDN, NULL, &pDnsRecord, NULL) != 0)
155 155
 	return NULL;
156 156
 
157
-    if(pDnsRecord->Data.TXT.dwStringCount > 0) {
157
+    if((pDnsRecord->Data.TXT.dwStringCount > 0) && pDnsRecord->Data.TXT.pStringArray[0]) {
158 158
 	txt = mmalloc(strlen(pDnsRecord->Data.TXT.pStringArray[0]) + 1);
159 159
 	if(txt)
160 160
 	    strcpy(txt, pDnsRecord->Data.TXT.pStringArray[0]);