- SGPath tpath( globals->get_fg_root() );
- if (splash_texture == NULL || !strcmp(splash_texture, "")) {
+ SGPath tpath;
+ if (splash_texture && strcmp(splash_texture, "")) {
+ tpath = globals->resolve_maybe_aircraft_path(splash_texture);
+ if (tpath.isNull())
+ {
+ SG_LOG( SG_GENERAL, SG_ALERT, "Cannot find splash screen file '" << splash_texture
+ << "'. Using default." );
+ }
+ }
+
+ if (tpath.isNull()) {
+ // no splash screen specified - select random image
+ tpath = globals->get_fg_root();