diff options
Diffstat (limited to 'source3/printing/nt_printing.c')
-rw-r--r-- | source3/printing/nt_printing.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/source3/printing/nt_printing.c b/source3/printing/nt_printing.c index 72e3d38bb3..73f1dd5f0d 100644 --- a/source3/printing/nt_printing.c +++ b/source3/printing/nt_printing.c @@ -2738,9 +2738,14 @@ BOOL is_printer_published(int snum, GUID *guid) SPOOL_DSSPOOLER_KEY)) < 0) return False; - ctr = &printer->info_2->data.keys[i].values; + if (!(ctr = &printer->info_2->data.keys[i].values)) { + return False; + } + + if (!(guid_val = regval_ctr_getvalue(ctr, "objectGUID"))) { + return False; + } - guid_val = regval_ctr_getvalue(ctr, "objectGUID"); if (regval_size(guid_val) == sizeof(GUID)) memcpy(guid, regval_data_p(guid_val), sizeof(GUID)); |