fixed null ptr exception in ShapeDialog