summaryrefslogtreecommitdiffstats
path: root/PC
diff options
context:
space:
mode:
Diffstat (limited to 'PC')
-rw-r--r--PC/winreg.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/PC/winreg.c b/PC/winreg.c
index d23810b..63c437e 100644
--- a/PC/winreg.c
+++ b/PC/winreg.c
@@ -871,8 +871,10 @@ Py2Reg(PyObject *value, DWORD typ, BYTE **retDataBuf, DWORD *retDataSize)
/* ALSO handle ALL unknown data types here. Even if we can't
support it natively, we should handle the bits. */
default:
- if (value == Py_None)
+ if (value == Py_None) {
*retDataSize = 0;
+ *retDataBuf = NULL;
+ }
else {
Py_buffer view;