Advertisement
Guest User

Untitled

a guest
Apr 10th, 2012
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.67 KB | None | 0 0
  1. diff --git a/gs/base/gxpcmap.c b/gs/base/gxpcmap.c
  2. index f6b1800..6f25543 100644
  3. --- a/gs/base/gxpcmap.c
  4. +++ b/gs/base/gxpcmap.c
  5. @@ -1315,19 +1315,21 @@ gx_pattern_load(gx_device_color * pdc, const gs_imager_state * pis,
  6.  
  7. code = (*pinst->templat.PaintProc)(&pdc->ccolor, saved);
  8. if (code < 0) {
  9. + /* RJW: At this point, in the non transparency case,
  10. + * saved->device == adev. So unretain it, close it, and the
  11. + * gs_state_free(saved) will remove it. In the transparency case,
  12. + * saved->device = the pdf14 device. So we need to unretain it,
  13. + * close adev, and finally close saved->device
  14. + * (which frees adev). */
  15. gx_device_retain(saved->device, false); /* device no longer retained */
  16. if (pinst->templat.uses_transparency) {
  17. - dev_proc(saved->device, close_device)((gx_device *)saved->device);
  18. - dev_proc(adev, close_device)((gx_device *)adev);
  19. if (pinst->is_clist == 0)
  20. gs_free_object(((gx_device_pattern_accum *)adev)->bitmap_memory,
  21. ((gx_device_pattern_accum *)adev)->transbuff,
  22. "gx_pattern_load");
  23. - // rc_decrement_only(adev, "gx_pattern_load"); /* may free the device */
  24. - // gs_free_object(mem, adev, "gx_pattern_load");
  25. - } else {
  26. dev_proc(adev, close_device)((gx_device *)adev);
  27. }
  28. + dev_proc(saved->device, close_device)((gx_device *)saved->device);
  29. /* Freeing the state should now free the device which may be the pdf14 compositor. */
  30. gs_state_free(saved);
  31. return code;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement