CleverRaven/Cataclysm-DDA — pull request #8315 by kevingranade (2014-07-24 08:21:44+00:00)
Title: Fix pouring liquids into wielded containers.

Fixes #8311
Pretty sure it's the same issue as reported here: http://smf.cataclysmdda.com/index.php?topic=7211
and here: http://smf.cataclysmdda.com/index.php?topic=7263
The issue was that set_drop_count() would stash a reference to the selected item, but my previous workaround of building a list of items to pass in, to match the way items were selected from the inventory created a copy of the item, which would then be invalidated. I was testing with dropping items, which works fine, but it crashes or fails to work when using the methods to select a container as a target for filling with liquid.