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