summaryrefslogtreecommitdiffstats
path: root/generic/tkCanvImg.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tkCanvImg.c')
-rw-r--r--generic/tkCanvImg.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/generic/tkCanvImg.c b/generic/tkCanvImg.c
index c88bb37..899741a 100644
--- a/generic/tkCanvImg.c
+++ b/generic/tkCanvImg.c
@@ -432,16 +432,16 @@ ComputeImageBbox(
Tk_Image image;
Tk_State state = imgPtr->header.state;
- if (state == TK_STATE_NULL) {
+ if(state == TK_STATE_NULL) {
state = Canvas(canvas)->canvas_state;
}
image = imgPtr->image;
if (Canvas(canvas)->currentItemPtr == (Tk_Item *)imgPtr) {
- if (imgPtr->activeImage) {
+ if (imgPtr->activeImage != NULL) {
image = imgPtr->activeImage;
}
} else if (state == TK_STATE_DISABLED) {
- if (imgPtr->disabledImage) {
+ if (imgPtr->disabledImage != NULL) {
image = imgPtr->disabledImage;
}
}
@@ -449,7 +449,7 @@ ComputeImageBbox(
x = (int) (imgPtr->x + ((imgPtr->x >= 0) ? 0.5 : - 0.5));
y = (int) (imgPtr->y + ((imgPtr->y >= 0) ? 0.5 : - 0.5));
- if ((state == TK_STATE_HIDDEN) || !image) {
+ if ((state == TK_STATE_HIDDEN) || (image == None)) {
imgPtr->header.x1 = imgPtr->header.x2 = x;
imgPtr->header.y1 = imgPtr->header.y2 = y;
return;