mirror of
https://github.com/The-Powder-Toy/The-Powder-Toy.git
synced 2025-08-01 06:00:15 +02:00
Fix crash when trying to load a stamp that doesn't exist
This commit is contained in:
@@ -1031,7 +1031,10 @@ SaveFile * Client::LoadSaveFile(ByteString filename)
|
||||
if (err.size())
|
||||
{
|
||||
std::cerr << "Client: " << filename << ": " << err << std::endl;
|
||||
file->SetLoadingError(err.FromUtf8());
|
||||
if (file)
|
||||
{
|
||||
file->SetLoadingError(err.FromUtf8());
|
||||
}
|
||||
#ifdef LUACONSOLE
|
||||
luacon_ci->SetLastError(err.FromUtf8());
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user