summaryrefslogtreecommitdiffstats
path: root/tksao/frame/base.C
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2016-11-10 21:53:09 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2016-11-10 21:53:09 (GMT)
commit88503fbe3360a6004b8a2be8ff32cf221c8ef783 (patch)
tree002b86581b30006097eec159575f03588bd7ff6b /tksao/frame/base.C
parent9aa3a1edb274a8454fededddaf049c276b9756f2 (diff)
downloadblt-88503fbe3360a6004b8a2be8ff32cf221c8ef783.zip
blt-88503fbe3360a6004b8a2be8ff32cf221c8ef783.tar.gz
blt-88503fbe3360a6004b8a2be8ff32cf221c8ef783.tar.bz2
add preventive check to make sure widgetGC has been created
Diffstat (limited to 'tksao/frame/base.C')
-rw-r--r--tksao/frame/base.C4
1 files changed, 4 insertions, 0 deletions
diff --git a/tksao/frame/base.C b/tksao/frame/base.C
index 22a0d9d..d981b9c 100644
--- a/tksao/frame/base.C
+++ b/tksao/frame/base.C
@@ -1685,6 +1685,10 @@ void Base::updateMagnifier(const Vector& vv)
if (!(magnifierXImage && magnifierPixmap))
return;
+ // just in case
+ if (!widgetGC)
+ widgetGC = XCreateGC(display, Tk_WindowId(tkwin), 0, NULL);
+
if (useMagnifier) {
updateMagnifierMatrices();