Move m_sectionIncubating/m_avatarIncubating/m_readMarkerIncubating set
This should be set *before* we clean up the incubator, because it could end up accessing invalid data when the incubator is freed. This fixes a regularly occuring crash when switching rooms.
This commit is contained in:
@@ -228,8 +228,8 @@ void MessageDelegateBase::updateAvatar()
|
|||||||
}
|
}
|
||||||
markAsDirty();
|
markAsDirty();
|
||||||
}
|
}
|
||||||
cleanupIncubator(incubator);
|
|
||||||
m_avatarIncubating = false;
|
m_avatarIncubating = false;
|
||||||
|
cleanupIncubator(incubator);
|
||||||
},
|
},
|
||||||
m_errorCallback);
|
m_errorCallback);
|
||||||
m_avatarComponent->create(*avatarIncubator, qmlContext(m_avatarComponent));
|
m_avatarComponent->create(*avatarIncubator, qmlContext(m_avatarComponent));
|
||||||
@@ -291,8 +291,8 @@ void MessageDelegateBase::updateSection()
|
|||||||
}
|
}
|
||||||
markAsDirty();
|
markAsDirty();
|
||||||
}
|
}
|
||||||
cleanupIncubator(incubator);
|
|
||||||
m_sectionIncubating = false;
|
m_sectionIncubating = false;
|
||||||
|
cleanupIncubator(incubator);
|
||||||
},
|
},
|
||||||
m_errorCallback);
|
m_errorCallback);
|
||||||
m_sectionComponent->create(*sectionIncubator, qmlContext(m_sectionComponent));
|
m_sectionComponent->create(*sectionIncubator, qmlContext(m_sectionComponent));
|
||||||
@@ -354,8 +354,8 @@ void MessageDelegateBase::updateReadMarker()
|
|||||||
}
|
}
|
||||||
markAsDirty();
|
markAsDirty();
|
||||||
}
|
}
|
||||||
cleanupIncubator(incubator);
|
|
||||||
m_readMarkerIncubating = false;
|
m_readMarkerIncubating = false;
|
||||||
|
cleanupIncubator(incubator);
|
||||||
},
|
},
|
||||||
m_errorCallback);
|
m_errorCallback);
|
||||||
m_readMarkerComponent->create(*readMarkerIncubator, qmlContext(m_readMarkerComponent));
|
m_readMarkerComponent->create(*readMarkerIncubator, qmlContext(m_readMarkerComponent));
|
||||||
|
|||||||
Reference in New Issue
Block a user