Skip to content

Commit

Permalink
Fixed issue #12708 Empty Scene Tileset causing crash.
Browse files Browse the repository at this point in the history
  • Loading branch information
Caleb Richardson authored and Caleb Richardson committed Nov 8, 2017
1 parent 5fb359d commit 967b3db
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1932,6 +1932,15 @@ void EditorNode::_menu_option_confirm(int p_option, bool p_confirmed) {

} break;
case FILE_EXPORT_TILESET: {

//Make sure Scene has a root before trying to convert to tileset
if (!editor_data.get_edited_scene_root()) {
current_option = -1;
accept->get_ok()->set_text(TTR("I see.."));
accept->set_text(TTR("This operation can't be done without a root."));
accept->popup_centered_minsize();
break;
}

List<String> extensions;
Ref<TileSet> ml(memnew(TileSet));
Expand Down

0 comments on commit 967b3db

Please sign in to comment.