Skip to content
Permalink
Browse files

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

  • Loading branch information...
coelckers committed Mar 13, 2019
1 parent 7f8b048 commit 43ca814da8138904f05d62478b04c2da2026b8b1
Showing with 2 additions and 7 deletions.
  1. +2 −7 src/serializer.cpp
@@ -2147,19 +2147,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;
}

0 comments on commit 43ca814

Please sign in to comment.
You can’t perform that action at this time.