summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXScrlbr.c
diff options
context:
space:
mode:
Diffstat (limited to 'macosx/tkMacOSXScrlbr.c')
-rw-r--r--macosx/tkMacOSXScrlbr.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/macosx/tkMacOSXScrlbr.c b/macosx/tkMacOSXScrlbr.c
index 0fa6561..4d2cb07 100644
--- a/macosx/tkMacOSXScrlbr.c
+++ b/macosx/tkMacOSXScrlbr.c
@@ -12,7 +12,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.5.2.11 2007/04/29 02:26:50 das Exp $
+ * RCS: @(#) $Id: tkMacOSXScrlbr.c,v 1.5.2.12 2007/05/09 12:57:46 das Exp $
*/
#include "tkMacOSXInt.h"
@@ -846,7 +846,9 @@ ScrollbarBindProc(
* Workaround for Carbon bug where the scrollbar down arrow
* sometimes gets "stuck" after the mousebutton has been released.
*/
- TkMacOSXSetUpClippingRgn(Tk_WindowId(scrollPtr->tkwin));
+ if (scrollPtr->tkwin) {
+ TkMacOSXSetUpClippingRgn(Tk_WindowId(scrollPtr->tkwin));
+ }
Draw1Control(macScrollPtr->sbHandle);
}
TkMacOSXTrackingLoop(0);
@@ -855,8 +857,11 @@ ScrollbarBindProc(
* The HandleControlClick call will "eat" the ButtonUp event. We now
* generate a ButtonUp event so Tk will unset implicit grabs etc.
*/
- window = Tk_WindowId(scrollPtr->tkwin);
- TkGenerateButtonEventForXPointer(window);
+
+ if (scrollPtr->tkwin) {
+ window = Tk_WindowId(scrollPtr->tkwin);
+ TkGenerateButtonEventForXPointer(window);
+ }
if (portChanged) {
QDSwapPort(savePort, NULL);