Fix crash when closing handles to asset file while any asset streaming task is active for asset from that file
This commit is contained in:
@@ -769,6 +769,11 @@ void Model::InitAsVirtual()
|
||||
BinaryAsset::InitAsVirtual();
|
||||
}
|
||||
|
||||
void Model::CancelStreaming()
|
||||
{
|
||||
CancelStreamingTasks();
|
||||
}
|
||||
|
||||
#if USE_EDITOR
|
||||
|
||||
void Model::GetReferences(Array<Guid>& output) const
|
||||
@@ -849,6 +854,15 @@ Task* Model::CreateStreamingTask(int32 residency)
|
||||
return result;
|
||||
}
|
||||
|
||||
void Model::CancelStreamingTasks()
|
||||
{
|
||||
if (_streamingTask)
|
||||
{
|
||||
_streamingTask->Cancel();
|
||||
ASSERT_LOW_LAYER(_streamingTask == nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
Asset::LoadResult Model::load()
|
||||
{
|
||||
// Get header chunk
|
||||
|
||||
Reference in New Issue
Block a user