1
0
Fork 0

Fix crash spotted on Sentry

This commit is contained in:
James Turner 2021-02-11 09:26:38 +00:00
parent ab95c8149a
commit 130cd2ae41

View file

@ -82,6 +82,12 @@ CanvasWidget::CanvasWidget( int x, int y,
if( load )
{
const char *s = load->getStringValue();
// avoid crash FLIGHTGEAR-5FQ
if (!s) {
SG_LOG(SG_GUI, SG_ALERT, "Empty 'load' script for Canvas widget:" << cprops->getStringValue("name"));
return;
}
nas->handleCommand(module.c_str(), file.c_str(), s, cprops);
}
}