summaryrefslogtreecommitdiff
path: root/amiga/font.c
diff options
context:
space:
mode:
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);
}