From: ThorstenB Date: Sun, 11 Dec 2011 12:04:10 +0000 (+0100) Subject: Provide error message when file isn't found. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=7f5dfe142164563f65a2d71b4027a5633952bd7f;p=flightgear.git Provide error message when file isn't found. --- 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());