mirror of
https://github.com/ZDoom/gzdoom-gles.git
synced 2024-11-16 01:21:17 +00:00
- fixed: The FFont* serializer was unable to handle null pointers.
This commit is contained in:
parent
3583cb1fe5
commit
1e587a7f1d
1 changed files with 2 additions and 7 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue