fix: segfault when closing (cancel) a GameObjectDialog window