Skip to content

Commit 79c6ee8

Browse files
committed
World::from_directory: Exit early when info file could not be found.
1 parent d0c3be5 commit 79c6ee8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/supertux/world.cpp

+8
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,14 @@ World::from_directory(const std::string& directory)
3737
try
3838
{
3939
register_translation_directory(info_filename);
40+
41+
if (!PHYSFS_exists(info_filename.c_str()) &&
42+
!FileSystem::exists(info_filename))
43+
{
44+
world->m_hide_from_contribs = true;
45+
return world;
46+
}
47+
4048
auto doc = ReaderDocument::from_file(info_filename);
4149
auto root = doc.get_root();
4250

0 commit comments

Comments
 (0)