diff --git a/src/proc/spatial-filter.cpp b/src/proc/spatial-filter.cpp index 0270640457..4849828dde 100644 --- a/src/proc/spatial-filter.cpp +++ b/src/proc/spatial-filter.cpp @@ -119,7 +119,7 @@ namespace librealsense holes_filling_mode->set_description(sp_hf_16_pixel_radius, "16-pixel radius"); holes_filling_mode->set_description(sp_hf_unlimited_radius, "Unlimited"); - auto weak_holes_filling_mode = std::weak_ptr>(); + auto weak_holes_filling_mode = std::weak_ptr>(holes_filling_mode); holes_filling_mode->on_set([this, weak_holes_filling_mode](float val) { auto strong_holes_filling_mode = weak_holes_filling_mode.lock();