- fixed: The FFont* serializer was unable to handle null pointers.

This commit is contained in:
Christoph Oelckers 2019-03-13 07:11:46 +01:00 committed by drfrag
parent 3583cb1fe5
commit 1e587a7f1d

View file

@ -2145,19 +2145,14 @@ template<> FSerializer &Serialize(FSerializer &arc, const char *key, FFont *&fon
{
if (arc.isWriting())
{
FName n = font->GetName();
FName n = font? font->GetName() : NAME_None;
return arc(key, n);
}
else
{
FName n = NAME_None;
arc(key, n);
font = V_GetFont(n);
if (font == nullptr)
{
Printf(TEXTCOLOR_ORANGE "Could not load font %s\n", n.GetChars());
font = SmallFont;
}
font = n == NAME_None? nullptr : V_GetFont(n);
return arc;
}