]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Check whether job->state is NULL, which can happen if the job is unloaded after
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 13 Dec 2012 16:24:25 +0000 (16:24 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Thu, 13 Dec 2012 16:24:25 +0000 (16:24 +0000)
stopping.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@10757 7a7537e8-13f0-0310-91df-b6672ffda945

scheduler/job.c

index b52892a1f96ffffb465ae1710956107af9085fc5..5bcb19bfbbd1a99c1fc1ecc93148565fd98258b2 100644 (file)
@@ -2475,8 +2475,10 @@ cupsdSetJobState(
   * Set the new job state...
   */
 
-  job->state->values[0].integer = newstate;
-  job->state_value              = newstate;
+  job->state_value = newstate;
+
+  if (job->state)
+    job->state->values[0].integer = newstate;
 
   switch (newstate)
   {