From 401f76559903845e9e0423d4b9187b2227c75119 Mon Sep 17 00:00:00 2001 From: tatiana-yan Date: Thu, 19 Jul 2018 17:04:13 +0300 Subject: [PATCH] [search] Fix possible crash --- search/utils.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/search/utils.cpp b/search/utils.cpp index cca289d5f9..ff8d2d0587 100644 --- a/search/utils.cpp +++ b/search/utils.cpp @@ -7,6 +7,8 @@ #include "indexer/data_source.hpp" +#include "base/cancellable.hpp" + #include #include @@ -96,8 +98,9 @@ void ForEachOfTypesInRect(DataSource const & dataSource, vector const vector> infos; dataSource.GetMwmsInfo(infos); - CategoriesCache cache(types, {} /* cancellable */); - auto pivotRectsCache = PivotRectsCache(1 /* maxNumEntries */, {} /* cancellable */, + base::Cancellable const cancellable; + CategoriesCache cache(types, cancellable); + auto pivotRectsCache = PivotRectsCache(1 /* maxNumEntries */, cancellable, max(pivot.SizeX(), pivot.SizeY()) /* maxRadiusMeters */); for (auto const & info : infos)