Skip to content

Commit

Permalink
Fix capturing self in the block while loading image in ASNetworkImage…
Browse files Browse the repository at this point in the history
…Node (#777)

* Fix capturing self in the block while loading image in ASNetworkImageNode

* Restore re-strongify while switching on the main thread

* Update CHANGELOG.md
  • Loading branch information
morozkin authored and Adlai-Holler committed Jan 31, 2018
1 parent 20e31f7 commit 511bec6
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## master
* Add your own contributions to the next release on the line below this with your name.
- [ASNetworkImageNode] Fix capturing self in the block while loading image in ASNetworkImageNode. [Denis Mororozov](https://github.com/morozkin) [#777](https://github.com/TextureGroup/Texture/pull/777)
- [ASTraitCollection] Add new properties of UITraitCollection to ASTraitCollection. [Yevgen Pogribnyi](https://github.com/ypogribnyi)
- [ASRectMap] Replace implementation of ASRectTable with a simpler one based on unordered_map.[Scott Goodson](https://github.com/appleguy) [#719](https://github.com/TextureGroup/Texture/pull/719)
- [ASCollectionView] Add missing flags for ASCollectionDelegate [Ilya Zheleznikov](https://github.com/ilyailya) [#718](https://github.com/TextureGroup/Texture/pull/718)
Expand Down
6 changes: 3 additions & 3 deletions Source/ASNetworkImageNode.mm
Original file line number Diff line number Diff line change
Expand Up @@ -697,9 +697,9 @@ - (void)_lazilyLoadImageIfNecessary
}

//No longer in preload range, no point in setting the results (they won't be cleared in exit preload range)
if (ASInterfaceStateIncludesPreload(self->_interfaceState) == NO) {
self->_downloadIdentifier = nil;
self->_cacheUUID = nil;
if (ASInterfaceStateIncludesPreload(strongSelf->_interfaceState) == NO) {
strongSelf->_downloadIdentifier = nil;
strongSelf->_cacheUUID = nil;
return;
}

Expand Down

0 comments on commit 511bec6

Please sign in to comment.