summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
Diffstat (limited to 'source3')
-rw-r--r--source3/printing/printing_db.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source3/printing/printing_db.c b/source3/printing/printing_db.c
index 9efb3e8ead..e13c0ac888 100644
--- a/source3/printing/printing_db.c
+++ b/source3/printing/printing_db.c
@@ -37,6 +37,9 @@ struct tdb_print_db *get_print_db_byname(const char *printername)
pstring printdb_path;
BOOL done_become_root = False;
+ if (printername == NULL)
+ return NULL;
+
for (p = print_db_head, last_entry = print_db_head; p; p = p->next) {
/* Ensure the list terminates... JRA. */
SMB_ASSERT(p->next != print_db_head);