Core/Misc: Fixed a possible crash in ProducerConsumerQueue::Cancel