From ba89a5da9229749995fe6e6e8995684f4ab98dba Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Mon, 26 Nov 2012 07:54:50 -0600 Subject: [PATCH] fix bug in error checking code --- collects/framework/private/text.rkt | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/collects/framework/private/text.rkt b/collects/framework/private/text.rkt index d051876193..2b81536531 100644 --- a/collects/framework/private/text.rkt +++ b/collects/framework/private/text.rkt @@ -42,12 +42,14 @@ (define-struct rectangle (left top right bottom style color) #:inspector #f) (define (build-rectangle left top right bottom style color) - (when (right . < . left) - (error 'build-rectangle "found right to the right of left: ~s" - (list left top right bottom style color))) - (when (bottom . < . top) - (error 'build-rectangle "found bottom above top: ~s" - (list left top right bottom style color))) + (unless (or (symbol? right) (symbol? left)) + (when (right . < . left) + (error 'build-rectangle "found right to the right of left: ~s" + (list left top right bottom style color)))) + (unless (or (symbol? top) (symbol? bottom)) + (when (bottom . < . top) + (error 'build-rectangle "found bottom above top: ~s" + (list left top right bottom style color)))) (make-rectangle left top right bottom style color))