]> git.saurik.com Git - wxWidgets.git/blobdiff - src/msw/dialup.cpp
don't compile in wx hash code unless we really use it (#9532:12)
[wxWidgets.git] / src / msw / dialup.cpp
index b708fb4612c07853dc7bec9c94ca604ae1ec7ee9..566c31c3353eb4d008f747e47e93dbb8d3a844ff 100644 (file)
@@ -709,7 +709,13 @@ size_t wxDialUpManagerMSW::GetISPNames(wxArrayString& names) const
         if ( dwRet == ERROR_BUFFER_TOO_SMALL )
         {
             // reallocate the buffer
-            rasEntries = (RASENTRYNAME *)realloc(rasEntries, size);
+            void *n  = realloc(rasEntries, size);
+            if (n == NULL)
+            {
+                free(rasEntries);
+                return 0;
+            }
+            rasEntries = (RASENTRYNAME *)n;
         }
         else if ( dwRet != 0 )
         {