Throw an exception when no valid scenery path defined.
This commit is contained in:
parent
1b29c13911
commit
dd2ea8f77d
1 changed files with 4 additions and 0 deletions
|
@ -25,6 +25,7 @@
|
|||
#endif
|
||||
|
||||
#include <simgear/compiler.h>
|
||||
#include <simgear/structure/exception.hxx>
|
||||
|
||||
#include <Main/globals.hxx>
|
||||
#include "FGTileLoader.hxx"
|
||||
|
@ -93,6 +94,9 @@ FGTileLoader::add( FGTileEntry* tile )
|
|||
static bool beenhere = false;
|
||||
if (!beenhere) {
|
||||
tile_path = globals->get_fg_scenery();
|
||||
if (!tile_path.size())
|
||||
throw sg_throwable(string("No valid scenery path defined!"));
|
||||
|
||||
beenhere = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue