m_primaryBuffer could be nullptr when a pipeline was inactive before, causing a crash (cherry picked from commit 17631398)