Skip to content

Commit 8e1cf3d

Browse files
committed
Add VERIFY_OR_DEBUG_ASSERT() to recognize null manifests during debugging.
1 parent 2aeb09e commit 8e1cf3d

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/effects/backends/effectmanifest.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ bool EffectManifest::hasMetaKnobLinking() const {
1616

1717
bool EffectManifest::sortLexigraphically(
1818
EffectManifestPointer pManifest1, EffectManifestPointer pManifest2) {
19-
// Defensive: null manifests sort to the end. A backend whose async
20-
// manifest loading times out may briefly expose null entries; crashing
21-
// std::sort on them is worse than a transiently misordered list.
22-
if (!pManifest1) {
19+
// Defensive: null manifests should no longer occur here, but
20+
// this check is retained to prevent std::sort from crashing if an
21+
// unexpected null pointer ever reaches this comparator. Nulls sort to the end.
22+
VERIFY_OR_DEBUG_ASSERT(pManifest1) {
2323
return false;
2424
}
25-
if (!pManifest2) {
25+
VERIFY_OR_DEBUG_ASSERT(pManifest2) {
2626
return true;
2727
}
2828
// Sort built-in effects first before external plugins

0 commit comments

Comments
 (0)