writer: Do not crash on ABI corpora that have no associated path

When write_context::record_corpus_as_emitted is invoked on an ABI
corpus that has no associated path, it crashes as that violates an
assert.

This patch loosens the assert, allowing ABI corpora with no associated
paths to be handled.

	* src/abg-writer.cc (write_context::record_corpus_as_emitted):
	Allow corpus without path.

Signed-off-by: Dodji Seketeli <dodji@redhat.com>
This commit is contained in:
Dodji Seketeli 2024-10-01 12:37:43 +02:00
parent 75e9536cb7
commit 1d6bc937a3

View File

@ -807,9 +807,8 @@ public:
return;
const string& path = corp->get_path();
ABG_ASSERT(!path.empty());
m_emitted_corpora_set.insert(path);
if (!path.empty())
m_emitted_corpora_set.insert(path);
}
/// Get the set of types that have been emitted.