summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorhobbs <hobbs>2007-07-04 18:10:52 (GMT)
committerhobbs <hobbs>2007-07-04 18:10:52 (GMT)
commit8c08129bc61f7b99269fd3b9a73a8cc4e14b40d5 (patch)
treef28fbff019c67d2190c749a6bcb811b07822b5d8
parent1f49c248b2b1f9f7efbeb6ebcc139bf7fcd659e3 (diff)
downloadtk-8c08129bc61f7b99269fd3b9a73a8cc4e14b40d5.zip
tk-8c08129bc61f7b99269fd3b9a73a8cc4e14b40d5.tar.gz
tk-8c08129bc61f7b99269fd3b9a73a8cc4e14b40d5.tar.bz2
* macosx/tkMacOSXXStubs.c (DestroyImage): Fixed crash in release
of image data for images coming from XGetImage, introduced 2007-06-23. (das)
-rw-r--r--ChangeLog6
-rw-r--r--macosx/tkMacOSXXStubs.c5
2 files changed, 8 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index cba169e..0400478 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-07-04 Jeff Hobbs <jeffh@ActiveState.com>
+
+ * macosx/tkMacOSXXStubs.c (DestroyImage): Fixed crash in release
+ of image data for images coming from XGetImage, introduced
+ 2007-06-23. (das)
+
2007-07-02 Daniel Steffen <das@users.sourceforge.net>
* xlib/xgc.c (XCreateGC): correct black and white pixel values used to
diff --git a/macosx/tkMacOSXXStubs.c b/macosx/tkMacOSXXStubs.c
index 726bfc8..1232a01 100644
--- a/macosx/tkMacOSXXStubs.c
+++ b/macosx/tkMacOSXXStubs.c
@@ -13,7 +13,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.2.2.18 2007/06/29 03:22:03 das Exp $
+ * RCS: @(#) $Id: tkMacOSXXStubs.c,v 1.2.2.19 2007/07/04 18:10:52 hobbs Exp $
*/
#include "tkMacOSXPrivate.h"
@@ -938,8 +938,7 @@ DestroyImage(
if (image) {
if (image->obdata) {
Tk_FreePixmap((Display*) gMacDisplay, (Pixmap) image->obdata);
- }
- if (image->data) {
+ } else if (image->data) {
ckfree(image->data);
}
ckfree((char*) image);