xbmc/xbmc — pull request #5764 by elupus (2014-11-19 19:37:31+00:00)
Title: jobs: fixed segmentation fault when thumbnail loader abort

JobManager grab a copy of the CWorkItem then release the lock,
if the cancel occurs right then. The callback can be in progress
after the CancelJob finishes.

Several locations assume it's safe to delete the callback target
after having cancelled pending jobs, so make sure we wait for
any in progress job completions or job progress calls.