Fix crash if an avatar is missing from the server

Which basically never happens.
This commit is contained in:
Tamás Bálint Misius 2023-06-18 15:37:13 +02:00
parent 5b610f0b0e
commit 0f418ec195
No known key found for this signature in database
GPG Key ID: 5B472A12F6ECA9F2

View File

@ -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();
} }
} }