lock weak resource

This commit is contained in:
SamGondelman 2018-05-31 11:54:37 -07:00
parent 9d5d4c52c0
commit 1470170296

View file

@ -636,7 +636,10 @@ void Resource::attemptRequest() {
<< "- retrying asset load - attempt" << _attempts << " of " << MAX_ATTEMPTS;
}
ResourceCache::attemptRequest(_self);
auto self = _self.lock();
if (self) {
ResourceCache::attemptRequest(self);
}
}
void Resource::finishedLoading(bool success) {