bjorn/tiled — pull request #93 by cjwillcock (2011-10-12 13:36:11+00:00)
Title: Tiny Fix

This fixes the segfault that occurs when using the tileset dock buttons (import,export,config,close) when no tileset is currently open.

The first button I clicked when I opened tiled was the import tileset button and it crashed the window. I found that in tilesetdock.cpp, the corresponding functions were not checking the return value of currentTileset() before using it as a pointer to a tileset (currentTileset() returns a 0 if no tileset is loaded.)

It would be better to disable these buttons (import,export,config,close) on program start and enable when they are usable (they are disabled when tilesets are closed.) How to disable buttons didn't jump out at me so I settled for this.