From 37404b15e859e009df0e737c93e8717ca8d5f3be Mon Sep 17 00:00:00 2001 From: ben Date: Mon, 14 Apr 2003 22:55:12 +0000 Subject: [PATCH] Don't call GetColor() if we don't have Color Quickdraw -- no good will come of it. git-svn-id: svn://svn.tartarus.org/sgt/putty@3120 cda61777-01e9-0310-a592-d414129be87e --- mac/macctrls.c | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/mac/macctrls.c b/mac/macctrls.c index 7f164de2..9e0ac1d0 100644 --- a/mac/macctrls.c +++ b/mac/macctrls.c @@ -1,4 +1,4 @@ -/* $Id: macctrls.c,v 1.35 2003/04/14 22:42:44 ben Exp $ */ +/* $Id: macctrls.c,v 1.36 2003/04/14 22:55:12 ben Exp $ */ /* * Copyright (c) 2003 Ben Harris * All rights reserved. @@ -1952,12 +1952,15 @@ void dlg_coloursel_start(union control *ctrl, void *dlg, Point where = {-1, -1}; /* Screen with greatest colour depth */ RGBColor incolour; - incolour.red = r * 0x0101; - incolour.green = g * 0x0101; - incolour.blue = b * 0x0101; - mcs->gotcolour = GetColor(where, "\pModify Colour:", &incolour, - &mcs->thecolour); - ctrlevent(mcs, mc, EVENT_CALLBACK); + if (HAVE_COLOR_QD()) { + incolour.red = r * 0x0101; + incolour.green = g * 0x0101; + incolour.blue = b * 0x0101; + mcs->gotcolour = GetColor(where, "\pModify Colour:", &incolour, + &mcs->thecolour); + ctrlevent(mcs, mc, EVENT_CALLBACK); + } else + dlg_beep(dlg); } int dlg_coloursel_results(union control *ctrl, void *dlg, -- 2.11.0