From 89a541f172778a0c798805530f049587a16aa3b2 Mon Sep 17 00:00:00 2001 From: Robert Haschke Date: Tue, 21 May 2024 08:51:13 +0200 Subject: [PATCH] Fix #1825/#1830: segfault when hiding deleted properties (#1831) --- src/rviz/properties/property.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/rviz/properties/property.cpp b/src/rviz/properties/property.cpp index df0fb7433..b86df0410 100644 --- a/src/rviz/properties/property.cpp +++ b/src/rviz/properties/property.cpp @@ -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++)