From 7f5dfe142164563f65a2d71b4027a5633952bd7f Mon Sep 17 00:00:00 2001 From: ThorstenB Date: Sun, 11 Dec 2011 13:04:10 +0100 Subject: [PATCH] Provide error message when file isn't found. --- src/Sound/fg_fx.cxx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Sound/fg_fx.cxx b/src/Sound/fg_fx.cxx index 390609567..94b7f6b98 100644 --- a/src/Sound/fg_fx.cxx +++ b/src/Sound/fg_fx.cxx @@ -94,6 +94,12 @@ FGFX::init() } SGPath path = globals->resolve_aircraft_path(path_str); + if (path.isNull()) + { + SG_LOG(SG_SOUND, SG_ALERT, + "File not found: '" << path_str); + return; + } SG_LOG(SG_SOUND, SG_INFO, "Reading sound " << node->getName() << " from " << path.str());