summaryrefslogtreecommitdiff
path: root/amiga/font.c
diff options
context:
space:
mode:
authorChris Young <chris@unsatisfactorysoftware.co.uk>2008-08-21 21:42:48 +0000
committerChris Young <chris@unsatisfactorysoftware.co.uk>2008-08-21 21:42:48 +0000
commitf071afe243ec7d8eef04319413611f74d46e34ae (patch)
treef832118cbf87a2a497d7d7cc6d8e08deb1541fd0 /amiga/font.c
parent7362250125ec18ff4162ea13ebcb620c50e1b042 (diff)
downloadnetsurf-f071afe243ec7d8eef04319413611f74d46e34ae.tar.gz
netsurf-f071afe243ec7d8eef04319413611f74d46e34ae.tar.bz2
Code cleanup.
svn path=/trunk/netsurf/; revision=5167
Diffstat (limited to 'amiga/font.c')
-rw-r--r--amiga/font.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/amiga/font.c b/amiga/font.c
index 1bb0674c2..3d476c0e2 100644
--- a/amiga/font.c
+++ b/amiga/font.c
@@ -75,6 +75,7 @@ bool nsfont_position_in_string(const struct css_style *style,
{
struct TextExtent extent;
struct TextFont *tfont = ami_open_font(style);
+
*char_offset = TextFit(currp,string,length,
&extent,NULL,1,x,32767);
@@ -228,5 +229,5 @@ void ami_close_font(struct TextFont *tfont)
RPTAG_Font,origrpfont,
TAG_DONE);
- CloseFont(tfont);
+ if(tfont) CloseFont(tfont);
}