Skip to content

Commit f82cda6

Browse files
committed
RE_RegisterFont: fix possibly uninitialized pointer
faceData might not be valid at the point it hits the warning "RE_RegisterFont: Unable to read font file %s".
1 parent af36e91 commit f82cda6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/engine/renderer/tr_font.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ static void RE_FreeFontFile( void *data )
583583
fontInfo_t* RE_RegisterFont( const char *fontName, int pointSize )
584584
{
585585
FT_Face face;
586-
void *faceData;
586+
void *faceData = nullptr;
587587
int i, len, fontNo;
588588
char fileName[ MAX_QPATH ];
589589
char strippedName[ MAX_QPATH ];

0 commit comments

Comments
 (0)