Skip to content

Commit f8b0c39

Browse files
committed
Ensure SDL font list has at least one font
1 parent 52c78d2 commit f8b0c39

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

kauai/src/fontsdl.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,10 +247,17 @@ bool NTL::FInit(void)
247247
goto LFail;
248248

249249
// Load fonts
250-
fRet = _FLoadFontTable();
250+
if (!_FLoadFontTable())
251+
goto LFail;
252+
251253
Assert(_pgst->IvMac() > 0, "No fonts loaded");
252254
Assert(_onnSystem != 0, "System font number not set");
253255

256+
if (_pgst->IvMac() == 0)
257+
goto LFail;
258+
259+
fRet = fTrue;
260+
254261
LFail:
255262
if (!fRet)
256263
PushErc(ercGfxNoFontList);

0 commit comments

Comments
 (0)