summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjenglish <jenglish@flightlab.com>2006-11-13 00:22:40 (GMT)
committerjenglish <jenglish@flightlab.com>2006-11-13 00:22:40 (GMT)
commit7655aa17f84f65e0da4755467acff756c7e3a33c (patch)
tree1f5ee08921c11d2b365a139f8c9eb3eb1c9132ab
parent47ce4df6b048104c8ceaf5640daf5f22785f4590 (diff)
downloadtk-7655aa17f84f65e0da4755467acff756c7e3a33c.zip
tk-7655aa17f84f65e0da4755467acff756c7e3a33c.tar.gz
tk-7655aa17f84f65e0da4755467acff756c7e3a33c.tar.bz2
*correct* fix for #1588251.
-rw-r--r--ChangeLog4
-rw-r--r--generic/ttk/ttkScroll.c16
2 files changed, 13 insertions, 7 deletions
diff --git a/ChangeLog b/ChangeLog
index c3ae667..7144e56 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
2006-11-12 Joe English <jenglish@users.sourceforge.net>
+ * generic/ttkScroll.c: *correct* fix for #1588251.
+
+2006-11-12 Joe English <jenglish@users.sourceforge.net>
+
* tests/ttk/ttk.test(ttk-6.9): Workaround for #1583038
2006-11-12 Joe English <jenglish@users.sourceforge.net>
diff --git a/generic/ttk/ttkScroll.c b/generic/ttk/ttkScroll.c
index 41173a6a..a7fa1f4 100644
--- a/generic/ttk/ttkScroll.c
+++ b/generic/ttk/ttkScroll.c
@@ -1,4 +1,4 @@
-/* $Id: ttkScroll.c,v 1.3 2006/11/12 20:35:38 jenglish Exp $
+/* $Id: ttkScroll.c,v 1.4 2006/11/13 00:22:40 jenglish Exp $
*
* Copyright 2004, Joe English
*
@@ -75,25 +75,27 @@ ScrollHandle TtkCreateScrollHandle(WidgetCore *corePtr, Scrollable *scrollPtr)
static int UpdateScrollbar(Tcl_Interp *interp, ScrollHandle h)
{
Scrollable *s = h->scrollPtr;
+ WidgetCore *corePtr = h->corePtr;
char args[TCL_DOUBLE_SPACE * 2];
int code;
h->flags &= ~SCROLL_UPDATE_REQUIRED;
- if (s->scrollCmd == NULL)
+ if (s->scrollCmd == NULL) {
return TCL_OK;
+ }
sprintf(args, " %g %g",
(double)s->first / s->total,
(double)s->last / s->total);
- Tcl_Preserve(h->corePtr);
+ Tcl_Preserve(corePtr);
code = Tcl_VarEval(interp, s->scrollCmd, args, NULL);
- if (WidgetDestroyed(h->corePtr)) {
- Tcl_Release(h->corePtr);
+ if (WidgetDestroyed(corePtr)) {
+ Tcl_Release(corePtr);
return TCL_ERROR;
}
- Tcl_Release(h->corePtr);
+ Tcl_Release(corePtr);
if (code != TCL_OK && !Tcl_InterpDeleted(interp)) {
/* Disable the -scrollcommand, add to stack trace:
@@ -240,6 +242,6 @@ void TtkFreeScrollHandle(ScrollHandle h)
if (h->flags & SCROLL_UPDATE_PENDING) {
Tcl_CancelIdleCall(UpdateScrollbarBG, (ClientData)h);
}
- Tcl_Free((ClientData)h);
+ ckfree((ClientData)h);
}