mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01:43 +00:00
Avoid crash in SourceImpl constructor.
The Frame constructor calls back into SourceImpl (the passed this reference), and when in-place constructed in the SourceImpl constructor, SourceImpl is only partially constructed.
This commit is contained in:
@@ -19,8 +19,9 @@ using namespace cs;
|
||||
|
||||
static constexpr std::size_t kMaxImagesAvail = 32;
|
||||
|
||||
SourceImpl::SourceImpl(llvm::StringRef name)
|
||||
: m_name{name}, m_frame{*this, llvm::StringRef{}, 0} {}
|
||||
SourceImpl::SourceImpl(llvm::StringRef name) : m_name{name} {
|
||||
m_frame = Frame{*this, llvm::StringRef{}, 0};
|
||||
}
|
||||
|
||||
SourceImpl::~SourceImpl() {
|
||||
// Wake up anyone who is waiting. This also clears the current frame,
|
||||
|
||||
Reference in New Issue
Block a user