summaryrefslogtreecommitdiffstats
path: root/mac
diff options
context:
space:
mode:
authorjingham <jingham>1999-08-07 18:53:23 (GMT)
committerjingham <jingham>1999-08-07 18:53:23 (GMT)
commite62407589a11501239b6535a0ec8982eb2e719ed (patch)
treecbfc7851c68a8d79a537ba05089c6fc516037493 /mac
parent88514478dcf5498d8cceb7995c061fe72d2f96a3 (diff)
downloadtk-e62407589a11501239b6535a0ec8982eb2e719ed.zip
tk-e62407589a11501239b6535a0ec8982eb2e719ed.tar.gz
tk-e62407589a11501239b6535a0ec8982eb2e719ed.tar.bz2
Check the return from Tk_MacGetColor before changing the color
Diffstat (limited to 'mac')
-rw-r--r--mac/tkMacButton.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/mac/tkMacButton.c b/mac/tkMacButton.c
index 54dd92b..144f79d 100644
--- a/mac/tkMacButton.c
+++ b/mac/tkMacButton.c
@@ -9,7 +9,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkMacButton.c,v 1.6 1999/05/22 06:32:26 jingham Exp $
+ * RCS: @(#) $Id: tkMacButton.c,v 1.7 1999/08/07 18:53:23 jingham Exp $
*/
#include "tkButton.h"
@@ -930,7 +930,8 @@ InitSampleControls()
OSErr err;
ControlRef dontCare;
- /* Adding UserPaneBackgroundProcs to the root control does
+ /*
+ * Adding UserPaneBackgroundProcs to the root control does
* not seem to work, so we have to add another UserPane to
* the root control.
*/
@@ -1336,9 +1337,10 @@ UpdateControlColors(
(butPtr->type == TYPE_RADIO_BUTTON))) {
RGBColor newColor;
- TkSetMacColor(xcolor->pixel, &newColor);
+ if (TkSetMacColor(xcolor->pixel, &newColor)) {
ChangeBackgroundWindowColor((**controlHandle).contrlOwner,
newColor, saveColorPtr);
+ }
return true;
}
}