mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-10 23:02:08 +00:00
- fixed: The FFont* serializer was unable to handle null pointers.
This commit is contained in:
parent
7f8b048347
commit
43ca814da8
1 changed files with 2 additions and 7 deletions
|
@ -2147,19 +2147,14 @@ template<> FSerializer &Serialize(FSerializer &arc, const char *key, FFont *&fon
|
||||||
{
|
{
|
||||||
if (arc.isWriting())
|
if (arc.isWriting())
|
||||||
{
|
{
|
||||||
FName n = font->GetName();
|
FName n = font? font->GetName() : NAME_None;
|
||||||
return arc(key, n);
|
return arc(key, n);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
FName n = NAME_None;
|
FName n = NAME_None;
|
||||||
arc(key, n);
|
arc(key, n);
|
||||||
font = V_GetFont(n);
|
font = n == NAME_None? nullptr : V_GetFont(n);
|
||||||
if (font == nullptr)
|
|
||||||
{
|
|
||||||
Printf(TEXTCOLOR_ORANGE "Could not load font %s\n", n.GetChars());
|
|
||||||
font = SmallFont;
|
|
||||||
}
|
|
||||||
return arc;
|
return arc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue