I just encountered an assert, investigated and fixed it. It turned out that the natives tried to sell -95 weapons for the price of 5. Sounds like a real bargain Either way it resulted in negative yields being stored in a city, hence the assert. I made the AI check for stored yields it's willing to sell. The problem was one check for stored yields without checking if the city wanted to sell it.