Skip to content

Commit

Permalink
Fix ros-visualization#1825/ros-visualization#1830: segfault when hidi…
Browse files Browse the repository at this point in the history
…ng deleted properties
  • Loading branch information
rhaschke committed May 18, 2024
1 parent 2db2c53 commit b7dbd41
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/rviz/properties/property.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -397,10 +397,7 @@ void Property::setModel(PropertyTreeModel* model)
if (model_ && hidden_)
{
// process propertyHiddenChanged after insertion into model has finished
QTimer::singleShot(0, model_, [this]() {
if (model_)
model_->emitPropertyHiddenChanged(this);
});
QTimer::singleShot(0, this, [this]() { model_->emitPropertyHiddenChanged(this); });
}
int num_children = numChildren();
for (int i = 0; i < num_children; i++)
Expand Down

0 comments on commit b7dbd41

Please sign in to comment.