mirror of
https://github.com/brunoherbelin/vimix.git
synced 2025-12-15 20:29:58 +01:00
BugFix: Clone source failed do not crash
Clone source that lost its origin can be replaced.
This commit is contained in:
@@ -223,12 +223,12 @@ void InfoVisitor::visit (RenderSource& s)
|
||||
|
||||
void InfoVisitor::visit (CloneSource& s)
|
||||
{
|
||||
if (current_id_ == s.id() || s.origin() == nullptr)
|
||||
if (current_id_ == s.id() && !s.failed())
|
||||
return;
|
||||
|
||||
std::ostringstream oss;
|
||||
|
||||
if (s.frame()){
|
||||
if (!s.failed() && s.frame()){
|
||||
if (brief_) {
|
||||
oss << (s.frame()->flags() & FrameBuffer::FrameBuffer_alpha ? "RGBA, " : "RGB, ");
|
||||
oss << s.frame()->width() << " x " << s.frame()->height();
|
||||
@@ -241,6 +241,8 @@ void InfoVisitor::visit (CloneSource& s)
|
||||
oss << s.frame()->width() << " x " << s.frame()->height();
|
||||
}
|
||||
}
|
||||
else
|
||||
oss << "Undefined";
|
||||
|
||||
information_ = oss.str();
|
||||
current_id_ = s.id();
|
||||
|
||||
Reference in New Issue
Block a user