summaryrefslogtreecommitdiff
path: root/source3/printing/printing.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/printing/printing.c')
-rw-r--r--source3/printing/printing.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/source3/printing/printing.c b/source3/printing/printing.c
index 49bd5ac8ba..fc3667ea3a 100644
--- a/source3/printing/printing.c
+++ b/source3/printing/printing.c
@@ -117,7 +117,9 @@ bool rap_to_pjobid(uint16 rap_jobid, fstring sharename, uint32 *pjobid)
if ( data.dptr && data.dsize == sizeof(struct rap_jobid_key) )
{
struct rap_jobid_key *jinfo = (struct rap_jobid_key*)data.dptr;
- fstrcpy( sharename, jinfo->sharename );
+ if (sharename != NULL) {
+ fstrcpy( sharename, jinfo->sharename );
+ }
*pjobid = jinfo->jobid;
DEBUG(10,("rap_to_pjobid: jobid %u maps to RAP jobid %u\n",
(unsigned int)*pjobid, (unsigned int)rap_jobid));