bjorn/tiled — pull request #321 by SJ-Dale (2012-12-26 12:38:56+00:00)
Title: Fix for tileset add crash.

Bug repro steps:

1. Create new map.
2. Add a tileset using an image.
3. Delete the newly added tileset.
4. Add another tileset using the same image.

Crash occurs on step 4 due to hitting an assert.

I'm not too familiar with your codebase, but this was the best I could do to fix the crash I encountered without spending a huge amount of time to investigate the code more thoroughly.