From 5b71a0055ffe619d7b2aaef453c39fcbc2b3f4e4 Mon Sep 17 00:00:00 2001 From: Tim Potter Date: Wed, 25 Sep 2002 06:25:02 +0000 Subject: The security descriptor in a PRINTER_INFO_2 could be NULL. (Bong?) (This used to be commit 7ce782c20c6b9e515a2fa831315ae14c66d322ee) --- source3/python/py_spoolss_printers_conv.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'source3/python/py_spoolss_printers_conv.c') diff --git a/source3/python/py_spoolss_printers_conv.c b/source3/python/py_spoolss_printers_conv.c index 760896fcde..9bef118f2b 100644 --- a/source3/python/py_spoolss_printers_conv.c +++ b/source3/python/py_spoolss_printers_conv.c @@ -224,8 +224,12 @@ BOOL py_from_PRINTER_INFO_2(PyObject **dict, PRINTER_INFO_2 *info) *dict = from_struct(info, py_PRINTER_INFO_2); - if (py_from_SECDESC(&obj, info->secdesc)) - PyDict_SetItemString(*dict, "security_descriptor", obj); + /* The security descriptor could be NULL */ + + if (info->secdesc) { + if (py_from_SECDESC(&obj, info->secdesc)) + PyDict_SetItemString(*dict, "security_descriptor", obj); + } /* Bong! The devmode could be NULL */ -- cgit