Fix crash when menu item has no label
This commit is contained in:
parent
edf766481d
commit
c2c4e6f126
1 changed files with 2 additions and 1 deletions
3
src/GUI/FGPUIMenuBar.cxx
Normal file → Executable file
3
src/GUI/FGPUIMenuBar.cxx
Normal file → Executable file
|
@ -162,7 +162,8 @@ FGPUIMenuBar::fireItem (puObject * item)
|
||||||
vector<SGBinding *> &bindings = _bindings[name];
|
vector<SGBinding *> &bindings = _bindings[name];
|
||||||
int nBindings = bindings.size();
|
int nBindings = bindings.size();
|
||||||
|
|
||||||
flightgear::addSentryBreadcrumb("fire menu item:" + string{item->getLabel()}, "info");
|
const string label = item->getLabel() ? string{ item->getLabel() } : "<unknown>";
|
||||||
|
flightgear::addSentryBreadcrumb("fire menu item:" + label, "info");
|
||||||
|
|
||||||
for (int i = 0; i < nBindings; i++)
|
for (int i = 0; i < nBindings; i++)
|
||||||
bindings[i]->fire();
|
bindings[i]->fire();
|
||||||
|
|
Loading…
Add table
Reference in a new issue