Fix nullptr segfault in VerilatedVcd::emitTimeChange() (#5980)

This commit is contained in:
Dominick Grochowina 2025-05-11 08:01:13 -04:00 committed by GitHub
parent fe4ad7de64
commit 295fae0edc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 1 deletions

View File

@ -45,6 +45,7 @@ David Stanford
David Turner
Dercury
Diego Roux
Dominick Grochowina
Don Williamson
Drew Ranck
Drew Taussig

View File

@ -193,7 +193,7 @@ void VerilatedVcd::emitTimeChange(uint64_t timeui) {
// timestamp backup and overwrite it.
// This is faster then checking on every signal change if time needs to
// be emitted. Note buffer flushes may still emit a rare duplicate.
if (m_wrTimeEndp == m_writep) m_writep = m_wrTimeBeginp;
if (m_wrTimeBeginp && m_wrTimeEndp == m_writep) m_writep = m_wrTimeBeginp;
m_wrTimeBeginp = m_writep;
{
printStr("#");