# HG changeset patch # User Frank Benoit # Date 1211059388 -7200 # Node ID 4436505b216fca768d71b04328cca9d11f8e6308 # Parent a8fed3e564335e370fef3717c200ab9d97569f1f Change behaviour of dwt.graphics.GC textExtend(): allow null for string argument diff -r a8fed3e56433 -r 4436505b216f dwt/graphics/GC.d --- a/dwt/graphics/GC.d Sat May 17 19:23:59 2008 +0200 +++ b/dwt/graphics/GC.d Sat May 17 23:23:08 2008 +0200 @@ -4794,9 +4794,6 @@ * @param string the string to measure * @return a point containing the extent of the string * - * @exception IllegalArgumentException * @exception DWTException @@ -4829,16 +4826,14 @@ * @param flags the flags specifying how to process the text * @return a point containing the extent of the string * - * @exception IllegalArgumentException * @exception DWTException */ public Point textExtent(String string, int flags) { if (handle is null) DWT.error(DWT.ERROR_GRAPHIC_DISPOSED); - if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); + //DWT_CHANGE: allow null string + //if (string is null) DWT.error (DWT.ERROR_NULL_ARGUMENT); checkGC(FONT); if (data.gdipGraphics !is null) { Gdip.PointF pt;