From 2a3e94649fb3f0dde4f54ed456ceed75defa46ff Mon Sep 17 00:00:00 2001
From: Khaled Hosny <khaledhosny@eglug.org>
Date: Sat, 5 Jun 2010 23:31:04 +0300
Subject: Make sure |fontdata| is a table

If the font were already loaded in TeX, fontdata will be the internal
font number of the already loaded font.
---
 luaotfload.dtx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(limited to 'luaotfload.dtx')

diff --git a/luaotfload.dtx b/luaotfload.dtx
index a593b4e..3101f8c 100644
--- a/luaotfload.dtx
+++ b/luaotfload.dtx
@@ -569,7 +569,7 @@ luaotfload.loadmodule('font-clr.lua')
 %    \begin{macrocode}
 local function def_font(...)
     local fontdata = fonts.define.read(...)
-    if fontdata then
+    if type(fontdata) == "table" then
         local capheight
         local units     = fontdata.units
         local size      = fontdata.size
-- 
cgit v1.2.3

