check if featureset is valid before passing to filter_featureset
This commit is contained in:
parent
e0ed71ff6a
commit
c7c4659e30
1 changed files with 6 additions and 7 deletions
13
src/map.cpp
13
src/map.cpp
|
@ -338,9 +338,9 @@ namespace mapnik
|
|||
#ifdef MAPNIK_DEBUG
|
||||
std::clog << " query at point tol = " << tol << " (" << x << "," << y << ")\n";
|
||||
#endif
|
||||
featureset_ptr fs(new filter_featureset<hit_test_filter>(ds->features_at_point(mapnik::coord2d(x,y)),
|
||||
hit_test_filter(x,y,tol)));
|
||||
return fs;
|
||||
featureset_ptr fs = ds->features_at_point(mapnik::coord2d(x,y));
|
||||
if (fs)
|
||||
return featureset_ptr(new filter_featureset<hit_test_filter>(fs,hit_test_filter(x,y,tol)));
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
|
@ -383,10 +383,9 @@ namespace mapnik
|
|||
#ifdef MAPNIK_DEBUG
|
||||
std::clog << " query at point tol = " << tol << " (" << x << "," << y << ")\n";
|
||||
#endif
|
||||
|
||||
featureset_ptr fs(new filter_featureset<hit_test_filter>(ds->features_at_point(mapnik::coord2d(x,y)),
|
||||
hit_test_filter(x,y,tol)));
|
||||
return fs;
|
||||
featureset_ptr fs = ds->features_at_point(mapnik::coord2d(x,y));
|
||||
if (fs)
|
||||
return featureset_ptr(new filter_featureset<hit_test_filter>(fs,hit_test_filter(x,y,tol)));
|
||||
}
|
||||
}
|
||||
catch (...)
|
||||
|
|
Loading…
Add table
Reference in a new issue