mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-04-27 06:19:51 -05:00
Do not assume that the GuiName or a DashboardItem is provided (closes #1006)
Do not try to load an empty URL as it triggers an assert
This commit is contained in:
@@ -111,8 +111,10 @@ DashboardItem::DashboardItem(const ghoul::Dictionary& dictionary)
|
||||
std::string identifier = dictionary.value<std::string>(IdentifierInfo.identifier);
|
||||
setIdentifier(std::move(identifier));
|
||||
|
||||
std::string guiName = dictionary.value<std::string>(GuiNameInfo.identifier);
|
||||
setGuiName(std::move(guiName));
|
||||
if (dictionary.hasKeyAndValue<std::string>(GuiNameInfo.identifier)) {
|
||||
std::string guiName = dictionary.value<std::string>(GuiNameInfo.identifier);
|
||||
setGuiName(std::move(guiName));
|
||||
}
|
||||
|
||||
addProperty(_isEnabled);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user