diff options
author | dgp@users.sourceforge.net <dgp> | 2015-02-11 13:40:01 (GMT) |
---|---|---|
committer | dgp@users.sourceforge.net <dgp> | 2015-02-11 13:40:01 (GMT) |
commit | af0d72f81bf1a5de18c07861a8f9d9c7b30bece0 (patch) | |
tree | a5d401ff7157c362aeb915b9de6066a0ec1def62 | |
parent | e19a3e04b51173ac68c850ac313350d691b8805a (diff) | |
download | tk-af0d72f81bf1a5de18c07861a8f9d9c7b30bece0.zip tk-af0d72f81bf1a5de18c07861a8f9d9c7b30bece0.tar.gz tk-af0d72f81bf1a5de18c07861a8f9d9c7b30bece0.tar.bz2 |
[6286e04179] Backport [5f8258ad2a] to stop `make test` segfaults.
-rw-r--r-- | generic/tkTextDisp.c | 13 |
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); |