[Download] fix crash while getting map element 44/165744/2
authorLukasz Bardeli <l.bardeli@samsung.com>
Wed, 3 Jan 2018 12:09:24 +0000 (13:09 +0100)
committerLukasz Bardeli <l.bardeli@samsung.com>
Wed, 3 Jan 2018 13:33:27 +0000 (13:33 +0000)
commit5a728282804ead74c16df240175aac789d0e5399
tree484dd758a2be44f890adc578314940e1d4229ed2
parentdc5892aa1e8c90a62fc920e7a48e805d94d6ed15
[Download] fix crash while getting map element

There may be situation when while destroying DownloadInfoPtr in DownloadInstance
destructor on second thread static method is called and check if instance is exist
and later try to read info from DownloadInfoPtr. To avoid this situation lock_guard
is moved just before part of code responsible for destroying DownloadInfoPtr

[Verification] Code compiles without error. 100% passrate

Change-Id: I20b0b0fc1b021d91d2f7daaf36500e4c2b83766c
src/download/download_instance.cc