summaryrefslogtreecommitdiff
path: root/geography/opencpn-plugin-draw
diff options
context:
space:
mode:
authorbouyer <bouyer>2016-05-23 08:55:15 +0000
committerbouyer <bouyer>2016-05-23 08:55:15 +0000
commit77082cc47e5ec221e200ac812bb1fda14eba1573 (patch)
tree55973b724d51d8619e767f22b86654506a737911 /geography/opencpn-plugin-draw
parentb583d8dbc6ab6334a93619e4b0f61aa900339b3d (diff)
downloadpkgsrc-77082cc47e5ec221e200ac812bb1fda14eba1573.tar.gz
Fix memory leak. Bump PKGREVISION
Diffstat (limited to 'geography/opencpn-plugin-draw')
-rw-r--r--geography/opencpn-plugin-draw/Makefile3
-rw-r--r--geography/opencpn-plugin-draw/distinfo3
-rw-r--r--geography/opencpn-plugin-draw/patches/patch-src_ocpn_draw_pi.cpp64
3 files changed, 68 insertions, 2 deletions
diff --git a/geography/opencpn-plugin-draw/Makefile b/geography/opencpn-plugin-draw/Makefile
index cccc93787df..e76fbf33b39 100644
--- a/geography/opencpn-plugin-draw/Makefile
+++ b/geography/opencpn-plugin-draw/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1 2016/04/24 10:21:54 bouyer Exp $
+# $NetBSD: Makefile,v 1.2 2016/05/23 08:55:15 bouyer Exp $
#
VERSION= 20160415
+PKGREVISION= 1
DISTNAME= ocpn_draw_pi-${VERSION}
PKGNAME= opencpn-plugin-draw-${VERSION}
CATEGORIES= geography
diff --git a/geography/opencpn-plugin-draw/distinfo b/geography/opencpn-plugin-draw/distinfo
index 9bf0d783fc1..894471f06cf 100644
--- a/geography/opencpn-plugin-draw/distinfo
+++ b/geography/opencpn-plugin-draw/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.2 2016/05/21 10:50:41 bouyer Exp $
+$NetBSD: distinfo,v 1.3 2016/05/23 08:55:15 bouyer Exp $
SHA1 (ocpn_draw_pi-20160415-047bb4c19c45e75f0bef3aba17ef7b52ef43d8af.tar.gz) = a1e06d6c810ad8e02a1f8f35677517e18adc28f6
RMD160 (ocpn_draw_pi-20160415-047bb4c19c45e75f0bef3aba17ef7b52ef43d8af.tar.gz) = 60c84b16d04a2e10a189a7c72e14b4f1405c9686
@@ -6,3 +6,4 @@ SHA512 (ocpn_draw_pi-20160415-047bb4c19c45e75f0bef3aba17ef7b52ef43d8af.tar.gz) =
Size (ocpn_draw_pi-20160415-047bb4c19c45e75f0bef3aba17ef7b52ef43d8af.tar.gz) = 1124238 bytes
SHA1 (patch-cmake_PluginConfigure.cmake) = 62dbbc6d13959fa313e6ea91ad6a28ee37da5fdd
SHA1 (patch-cmake_PluginInstall.cmake) = 43a906b0a75a1e358ccd96992e1c14d526d07b4b
+SHA1 (patch-src_ocpn_draw_pi.cpp) = e857b850708328b9fc7af9d930429b0e1446c250
diff --git a/geography/opencpn-plugin-draw/patches/patch-src_ocpn_draw_pi.cpp b/geography/opencpn-plugin-draw/patches/patch-src_ocpn_draw_pi.cpp
new file mode 100644
index 00000000000..a2f3eb65a20
--- /dev/null
+++ b/geography/opencpn-plugin-draw/patches/patch-src_ocpn_draw_pi.cpp
@@ -0,0 +1,64 @@
+$NetBSD: patch-src_ocpn_draw_pi.cpp,v 1.1 2016/05/23 08:55:15 bouyer Exp $
+https://github.com/jongough/ocpn_draw_pi/issues/250
+
+--- src/ocpn_draw_pi.cpp.orig 2016-04-13 08:28:11.000000000 +0200
++++ src/ocpn_draw_pi.cpp 2016-05-22 12:46:48.678028290 +0200
+@@ -217,7 +217,6 @@
+
+ PlugIn_ViewPort *g_pVP;
+ PlugIn_ViewPort g_VP;
+-ODDC *g_pDC;
+ bool g_bShowMag;
+ double g_dVar;
+ double g_UserVar;
+@@ -2385,6 +2384,7 @@
+ format = wxS("%4.0f ");
+ }
+ result << wxString::Format(format, usrDistance ) << *sUnit;
++ delete sUnit;
+ return result;
+ }
+ void ocpn_draw_pi::latlong_to_chartpix(double lat, double lon, double &pixx, double &pixy)
+@@ -2417,14 +2417,14 @@
+ m_chart_scale = pivp->chart_scale;
+ m_view_scale = pivp->view_scale_ppm;
+
+- g_pDC = new ODDC( dc );
++ ODDC g_pDC(dc);
+ LLBBox llbb;
+ llbb.SetMin( pivp->lon_min, pivp->lat_min );
+ llbb.SetMax( pivp->lon_max, pivp->lat_max );
+
+- DrawAllPathsInBBox( *g_pDC, llbb );
+- DrawAllODPointsInBBox( *g_pDC, llbb );
+- RenderPathLegs( *g_pDC );
++ DrawAllPathsInBBox( g_pDC, llbb );
++ DrawAllODPointsInBBox( g_pDC, llbb );
++ RenderPathLegs( g_pDC );
+
+ return TRUE;
+ }
+@@ -2438,20 +2438,20 @@
+ m_chart_scale = pivp->chart_scale;
+ m_view_scale = pivp->view_scale_ppm;
+
+- g_pDC = new ODDC();
++ ODDC g_pDC;
+ LLBBox llbb;
+ llbb.SetMin( pivp->lon_min, pivp->lat_min );
+ llbb.SetMax( pivp->lon_max, pivp->lat_max );
+
+ // DrawAllODPointsInBBox( *g_pDC, llbb );
+- RenderPathLegs( *g_pDC );
++ RenderPathLegs( g_pDC );
+
+ if (m_pMouseBoundary) m_pMouseBoundary->DrawGL( *pivp );
+
+ DrawAllPathsAndODPoints( *pivp );
+
+ if( g_pODRolloverWin && g_pODRolloverWin->IsActive() && g_pODRolloverWin->GetBitmap() != NULL ) {
+- g_pDC->DrawBitmap( *(g_pODRolloverWin->GetBitmap()),
++ g_pDC.DrawBitmap( *(g_pODRolloverWin->GetBitmap()),
+ g_pODRolloverWin->GetPosition().x,
+ g_pODRolloverWin->GetPosition().y, false );
+ }