diff options
Diffstat (limited to 'PC/getpathp.c')
-rw-r--r-- | PC/getpathp.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/PC/getpathp.c b/PC/getpathp.c index 2bd3f26..729d2e4 100644 --- a/PC/getpathp.c +++ b/PC/getpathp.c @@ -297,6 +297,10 @@ getpythonregpath(HKEY keyBase, int skipcore) } RegCloseKey(subKey); } + + /* return null if no path to return */ + if (dataSize == 0) goto done; + /* original datasize from RegQueryInfo doesn't include the \0 */ dataBuf = malloc((dataSize+1) * sizeof(TCHAR)); if (dataBuf) { |