Crashfix: Prevent escape from material selection

[Thread](http://smf.cataclysmdda.com/index.php?topic=2589.msg34008#msg34008)