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:
@@ -760,6 +760,11 @@ void SkinnedModel::InitAsVirtual()
|
||||
BinaryAsset::InitAsVirtual();
|
||||
}
|
||||
|
||||
void SkinnedModel::CancelStreaming()
|
||||
{
|
||||
CancelStreamingTasks();
|
||||
}
|
||||
|
||||
#if USE_EDITOR
|
||||
|
||||
void SkinnedModel::GetReferences(Array<Guid>& output) const
|
||||
@@ -840,6 +845,15 @@ Task* SkinnedModel::CreateStreamingTask(int32 residency)
|
||||
return result;
|
||||
}
|
||||
|
||||
void SkinnedModel::CancelStreamingTasks()
|
||||
{
|
||||
if (_streamingTask)
|
||||
{
|
||||
_streamingTask->Cancel();
|
||||
ASSERT_LOW_LAYER(_streamingTask == nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
Asset::LoadResult SkinnedModel::load()
|
||||
{
|
||||
// Get header chunk
|
||||
|
||||
Reference in New Issue
Block a user