summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2015-02-11 13:40:01 (GMT)
committerdgp <dgp@users.sourceforge.net>2015-02-11 13:40:01 (GMT)
commitf106936176670106642c46d31584e60a29e1750e (patch)
treea50a36929bb943bdc9168b4feefedf04561bab13 /generic
parentcbe5c614063fd45e76bb651ed43bd6b7073b284c (diff)
downloadtk-f106936176670106642c46d31584e60a29e1750e.zip
tk-f106936176670106642c46d31584e60a29e1750e.tar.gz
tk-f106936176670106642c46d31584e60a29e1750e.tar.bz2
[6286e04179] Backport [5f8258ad2a] to stop `make test` segfaults.
Diffstat (limited to 'generic')
-rw-r--r--generic/tkTextDisp.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/generic/tkTextDisp.c b/generic/tkTextDisp.c
index f718e2a..8cd5a9a 100644
--- a/generic/tkTextDisp.c
+++ b/generic/tkTextDisp.c
@@ -3938,8 +3938,17 @@ RedisplayText(
{
register TkText *textPtr = (TkText *) clientData;
TextDInfo *dInfoPtr = textPtr->dInfoPtr;
- TkRegion damageRegion = TkCreateRegion();
- XRectangle rectangle = {0, 0, dInfoPtr->maxX, dInfoPtr->maxY};
+ TkRegion damageRegion;
+ XRectangle rectangle;
+
+ if (dInfoPtr == NULL) {
+ return;
+ }
+ damageRegion = TkCreateRegion();
+ rectangle.x = 0;
+ rectangle.y = 0;
+ rectangle.width = dInfoPtr->maxX;
+ rectangle.height = dInfoPtr->maxY;
TkUnionRectWithRegion(&rectangle, damageRegion, damageRegion);
TextInvalidateRegion(textPtr, damageRegion);