summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvPs.c
diff options
context:
space:
mode:
authorfvogel <fvogelnew1@free.fr>2022-04-03 10:43:56 (GMT)
committerfvogel <fvogelnew1@free.fr>2022-04-03 10:43:56 (GMT)
commitb1f5acd445e52aadf8ad909c78535aeaab0f60fe (patch)
tree02ff54d16a18a86049984d6ae5ed1f4c30c16725 /generic/tkCanvPs.c
parent4d7dd5c1d1a545bed4de7e4b6627e1302796b0f0 (diff)
parentfebcba8fc330403fb595f58acc3570f3d29fe1ed (diff)
downloadtk-b1f5acd445e52aadf8ad909c78535aeaab0f60fe.zip
tk-b1f5acd445e52aadf8ad909c78535aeaab0f60fe.tar.gz
tk-b1f5acd445e52aadf8ad909c78535aeaab0f60fe.tar.bz2
merge 8.6
Diffstat (limited to 'generic/tkCanvPs.c')
-rw-r--r--generic/tkCanvPs.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/generic/tkCanvPs.c b/generic/tkCanvPs.c
index 1a8b3d3..fc3a772 100644
--- a/generic/tkCanvPs.c
+++ b/generic/tkCanvPs.c
@@ -904,6 +904,18 @@ PostscriptBitmap(
imagePtr = XGetImage(Tk_Display(tkwin), bitmap, 0, 0,
totalWidth, totalHeight, 1, XYPixmap);
+
+ if (!imagePtr) {
+ /*
+ * The XGetImage() function is apparently not implemented on this
+ * system. Just skip the pixels, the Postscript will still be
+ * syntactically correct.
+ */
+
+ Tcl_AppendToObj(psObj, "<>", -1);
+ return;
+ }
+
Tcl_AppendToObj(psObj, "<", -1);
mask = 0x80;
value = 0;