diff options
author | Vladimir Byko-Ianko <v.bykoianko@corp.mail.ru> | 2015-01-30 16:17:17 +0300 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 02:36:52 +0300 |
commit | c23a1907cdcf70d06c29017a7a5a685502623baa (patch) | |
tree | beab6d47e0bcef53699393936d47299fb821e9a0 /map/track.cpp | |
parent | 868359ba1f2d4b68eecee102c3a768f76892afca (diff) |
Crash and memory leak was fixed.
Diffstat (limited to 'map/track.cpp')
-rw-r--r-- | map/track.cpp | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/map/track.cpp b/map/track.cpp index f998ed31e6..2426f06f19 100644 --- a/map/track.cpp +++ b/map/track.cpp @@ -78,7 +78,7 @@ void Track::CreateDisplayListPolyline(graphics::Screen * dlScreen, PointContaine void Track::CreateDisplayList(graphics::Screen * dlScreen, MatrixT const & matrix, bool isScaleChanged, int, double, location::RouteMatchingInfo const &) const { - if (HasDisplayList() && !isScaleChanged) + if (HasDisplayLists() && !isScaleChanged) return; DeleteDisplayList(); @@ -127,6 +127,16 @@ void Track::Swap(Track & rhs) rhs.DeleteDisplayList(); } +void Track::CleanUp() const +{ + DeleteDisplayList(); +} + +bool Track::HasDisplayLists() const +{ + return m_dList != nullptr; +} + void TransformPolyline(Track::PolylineD const & polyline, MatrixT const & matrix, PointContainerT & pts) { pts.resize(polyline.GetSize()); |