mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-02 14:37:32 +02:00
Fix crash if an avatar is missing from the server
Which basically never happens.
This commit is contained in:
@@ -27,8 +27,15 @@ void AvatarButton::Tick(float dt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (imageRequest && imageRequest->CheckDone())
|
if (imageRequest && imageRequest->CheckDone())
|
||||||
|
{
|
||||||
|
try
|
||||||
{
|
{
|
||||||
avatar = imageRequest->Finish();
|
avatar = imageRequest->Finish();
|
||||||
|
}
|
||||||
|
catch (const http::RequestError &ex)
|
||||||
|
{
|
||||||
|
// Nothing, oh well.
|
||||||
|
}
|
||||||
imageRequest.reset();
|
imageRequest.reset();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user