Skip to content

Commit

Permalink
Fix potential crash in attribute description database.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashaduri committed Nov 19, 2024
1 parent 93384e4 commit 840398c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/applib/storage_property_descr_ata_attribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)));
Expand Down

0 comments on commit 840398c

Please sign in to comment.