mirror of
https://github.com/ashaduri/gsmartcontrol.git
synced 2026-09-24 21:05:38 +00:00
Fix potential crash in attribute description database.
This commit is contained in:
@@ -1084,7 +1084,7 @@ namespace {
|
||||
{
|
||||
auto iter = id_db.find(id);
|
||||
DBG_ASSERT(iter != id_db.end() && !iter->second.empty());
|
||||
if (iter != id_db.end() || iter->second.empty()) {
|
||||
if (iter != id_db.end() && !iter->second.empty()) {
|
||||
AtaAttributeDescription attr = iter->second.front();
|
||||
add(AtaAttributeDescription(id, type,
|
||||
std::move(reported_name), std::move(attr.displayable_name), std::move(attr.generic_name), std::move(attr.description)));
|
||||
|
||||
Reference in New Issue
Block a user