Mercurial > projects > dwt-addons
diff dwtx/ui/internal/forms/widgets/FormFonts.d @ 85:56fea7e5f0f9
Fix some runtime errors
author | Frank Benoit <benoit@tionex.de> |
---|---|
date | Fri, 20 Jun 2008 14:48:17 +0200 |
parents | e193036d82c9 |
children | 04b47443bb01 |
line wrap: on
line diff
--- a/dwtx/ui/internal/forms/widgets/FormFonts.d Fri Jun 20 13:00:15 2008 +0200 +++ b/dwtx/ui/internal/forms/widgets/FormFonts.d Fri Jun 20 14:48:17 2008 +0200 @@ -85,7 +85,7 @@ public Font getBoldFont(Display display, Font font) { checkHashMaps(); FontIdentifier fid = new FontIdentifier(display, font); - FontReference result = cast(FontReference) fonts.get(fid); + FontReference result = fonts.containsKey(fid) ? cast(FontReference) fonts.get(fid) : null; if (result !is null && !result.getFont().isDisposed()) { result.incCount(); return result.getFont();