Nasal geodinfo: warn when scenery is not loaded
This commit is contained in:
parent
8edcaa4853
commit
9389c6564f
1 changed files with 4 additions and 2 deletions
|
@ -1457,8 +1457,10 @@ static naRef f_geodinfo(naContext c, naRef me, int argc, naRef* args)
|
|||
if (scenery == nullptr)
|
||||
return naNil();
|
||||
|
||||
if(!scenery->get_elevation_m(geod, elev, &material))
|
||||
return naNil();
|
||||
if(!scenery->get_elevation_m(geod, elev, &material)) {
|
||||
SG_LOG(SG_TERRAIN, SG_DEV_WARN, "Nasal geodinfo() querying location with no loaded tiles:" << geod);
|
||||
return naNil();
|
||||
}
|
||||
|
||||
naRef vec = naNewVector(c);
|
||||
naVec_append(vec, naNum(elev));
|
||||
|
|
Loading…
Reference in a new issue