mrjt Messages: 705 Registered: March 2007 Location: London
Contributor
In such a situation it is better to crash ASAP than abort silently IMO. The code should work if count == 0 and count < 0 indicates that either a) the container has been picked, which I don't think has happenned in this case) or b) There is some memory erorr somewhere else which needs fixing. The function was almost certainly called on a hanging/invalid pointer.