diff options
author | dkf <dkf@noemail.net> | 2004-06-25 08:46:18 (GMT) |
---|---|---|
committer | dkf <dkf@noemail.net> | 2004-06-25 08:46:18 (GMT) |
commit | a95f3b06a6337e1e497560d71976d5a675d6da20 (patch) | |
tree | 300bdbf751fffaf45a10beb928d52a81f86718d0 /generic/tkImgPhoto.c | |
parent | fee1991695ee52cb5abddbb6644c39d0e33bfb7d (diff) | |
download | tk-a95f3b06a6337e1e497560d71976d5a675d6da20.zip tk-a95f3b06a6337e1e497560d71976d5a675d6da20.tar.gz tk-a95f3b06a6337e1e497560d71976d5a675d6da20.tar.bz2 |
Fix [Bug 979239] by only redrawing an image when it has real area.
FossilOrigin-Name: 19ad28a1495b29bc1fbf97912568f549dda0d02c
Diffstat (limited to 'generic/tkImgPhoto.c')
-rw-r--r-- | generic/tkImgPhoto.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/generic/tkImgPhoto.c b/generic/tkImgPhoto.c index 6702946..83a7f8b 100644 --- a/generic/tkImgPhoto.c +++ b/generic/tkImgPhoto.c @@ -17,7 +17,7 @@ * Department of Computer Science, * Australian National University. * - * RCS: @(#) $Id: tkImgPhoto.c,v 1.36.2.8 2004/05/03 18:01:32 hobbs Exp $ + * RCS: @(#) $Id: tkImgPhoto.c,v 1.36.2.9 2004/06/25 08:46:20 dkf Exp $ */ #include "tkInt.h" @@ -2719,6 +2719,15 @@ ImgPhotoDisplay(clientData, display, drawable, imageX, imageY, width, return; } + /* + * Check for bogus widths/heights. This prevents us from calling + * XGetImage with a zero size, which it does not like. [Bug 979239] + */ + + if (width < 1 || height < 1) { + return; + } + if ( #if defined(MAC_TCL) /* |