summaryrefslogtreecommitdiff
path: root/geography/opencpn-plugin-draw
diff options
context:
space:
mode:
authorbouyer <bouyer>2016-05-23 13:10:15 +0000
committerbouyer <bouyer>2016-05-23 13:10:15 +0000
commit1cc756c4fff27b2b8bdfc1e44cc459cd6f88ea01 (patch)
tree0541410ebaa59549f51896755b9932f0c34252a7 /geography/opencpn-plugin-draw
parent49961fdf037d79a670bc35a4c5f60e00b400e124 (diff)
downloadpkgsrc-1cc756c4fff27b2b8bdfc1e44cc459cd6f88ea01.tar.gz
The memory leak fix introcuced a double free, that didn't cause problems
on linux but did on NetBSD. Fix the double free and bump PKGREVISION
Diffstat (limited to 'geography/opencpn-plugin-draw')
-rw-r--r--geography/opencpn-plugin-draw/Makefile4
-rw-r--r--geography/opencpn-plugin-draw/distinfo4
-rw-r--r--geography/opencpn-plugin-draw/patches/patch-src_ocpn_draw_pi.cpp79
3 files changed, 81 insertions, 6 deletions
diff --git a/geography/opencpn-plugin-draw/Makefile b/geography/opencpn-plugin-draw/Makefile
index e76fbf33b39..9305c3ec001 100644
--- a/geography/opencpn-plugin-draw/Makefile
+++ b/geography/opencpn-plugin-draw/Makefile
@@ -1,8 +1,8 @@
-# $NetBSD: Makefile,v 1.2 2016/05/23 08:55:15 bouyer Exp $
+# $NetBSD: Makefile,v 1.3 2016/05/23 13:10:15 bouyer Exp $
#
VERSION= 20160415
-PKGREVISION= 1
+PKGREVISION= 2
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 894471f06cf..ef1f294ec6b 100644
--- a/geography/opencpn-plugin-draw/distinfo
+++ b/geography/opencpn-plugin-draw/distinfo
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.3 2016/05/23 08:55:15 bouyer Exp $
+$NetBSD: distinfo,v 1.4 2016/05/23 13:10:15 bouyer Exp $
SHA1 (ocpn_draw_pi-20160415-047bb4c19c45e75f0bef3aba17ef7b52ef43d8af.tar.gz) = a1e06d6c810ad8e02a1f8f35677517e18adc28f6
RMD160 (ocpn_draw_pi-20160415-047bb4c19c45e75f0bef3aba17ef7b52ef43d8af.tar.gz) = 60c84b16d04a2e10a189a7c72e14b4f1405c9686
@@ -6,4 +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
+SHA1 (patch-src_ocpn_draw_pi.cpp) = f67b33fc833e0c282508e7d2cb4930d95df4901c
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
index a2f3eb65a20..52324a3e533 100644
--- a/geography/opencpn-plugin-draw/patches/patch-src_ocpn_draw_pi.cpp
+++ b/geography/opencpn-plugin-draw/patches/patch-src_ocpn_draw_pi.cpp
@@ -1,8 +1,8 @@
-$NetBSD: patch-src_ocpn_draw_pi.cpp,v 1.1 2016/05/23 08:55:15 bouyer Exp $
+$NetBSD: patch-src_ocpn_draw_pi.cpp,v 1.2 2016/05/23 13:10: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
++++ src/ocpn_draw_pi.cpp 2016-05-23 14:51:23.159399881 +0200
@@ -217,7 +217,6 @@
PlugIn_ViewPort *g_pVP;
@@ -62,3 +62,78 @@ https://github.com/jongough/ocpn_draw_pi/issues/250
g_pODRolloverWin->GetPosition().x,
g_pODRolloverWin->GetPosition().y, false );
}
+@@ -2461,8 +2461,6 @@
+
+ void ocpn_draw_pi::RenderPathLegs( ODDC &dc )
+ {
+- ODDC tdc( dc );
+-
+ if( nBoundary_State >= 2) {
+
+ Boundary* boundary = 0;
+@@ -2492,7 +2490,7 @@
+ }
+
+ // if( !IsTouchInterface_PlugIn) {
+- boundary->DrawPointWhich( tdc, boundary->m_lastMousePointIndex, &lastPoint );
++ boundary->DrawPointWhich( dc, boundary->m_lastMousePointIndex, &lastPoint );
+ if( boundary->m_NextLegGreatCircle ) {
+ for( int i=1; i<=milesDiff; i++ ) {
+ double p = (double)i * (1.0/(double)milesDiff);
+@@ -2500,24 +2498,24 @@
+ Geodesic::GreatCircleTravel( m_prev_rlon, m_prev_rlat, gcDist*p, brg, &pLon, &pLat, &gcBearing2 );
+ GetCanvasPixLL( m_pVP, &destPoint, m_cursor_lat, m_cursor_lon);
+ //destPoint = VPoint.GetPixFromLL( pLat, pLon );
+- boundary->DrawSegment( tdc, &lastPoint, &destPoint, *m_pVP, false );
++ boundary->DrawSegment( dc, &lastPoint, &destPoint, *m_pVP, false );
+ wxPoint rpn;
+- boundary->GetPoint( 1 )->Draw( tdc, &rpn );
+- boundary->DrawSegment( tdc, &rpn , &destPoint, *m_pVP, false );
++ boundary->GetPoint( 1 )->Draw( dc, &rpn );
++ boundary->DrawSegment( dc, &rpn , &destPoint, *m_pVP, false );
+ lastPoint = destPoint;
+ }
+ }
+ else {
+- boundary->DrawSegment( tdc, &lastPoint, &r_rband, *m_pVP, false );
++ boundary->DrawSegment( dc, &lastPoint, &r_rband, *m_pVP, false );
+ if ( nBoundary_State >= 2) {
+ wxPoint rpn;
+- boundary->GetPoint( 1 )->Draw( tdc, &rpn );
+- boundary->DrawSegment( tdc, &rpn , &r_rband, *m_pVP, false );
++ boundary->GetPoint( 1 )->Draw( dc, &rpn );
++ boundary->DrawSegment( dc, &rpn , &r_rband, *m_pVP, false );
+ }
+ }
+
+- wxString info = CreateExtraPathLegInfo(tdc, boundary, brg, dist, m_cursorPoint);
+- RenderExtraPathLegInfo( tdc, r_rband, info );
++ wxString info = CreateExtraPathLegInfo(dc, boundary, brg, dist, m_cursorPoint);
++ RenderExtraPathLegInfo( dc, r_rband, info );
+ } else if( nEBL_State > 0 || m_bEBLMoveOrigin ) {
+ EBL *ebl = new EBL();
+ double brg, dist;
+@@ -2526,19 +2524,17 @@
+ ODPoint *tp = (ODPoint *) m_pSelectedEBL->m_pODPointList->GetLast()->GetData();
+ GetCanvasPixLL( g_pVP, &tpoint, tp->m_lat, tp->m_lon );
+ DistanceBearingMercator_Plugin( m_cursor_lat, m_cursor_lon, tp->m_lat, tp->m_lon, &brg, &dist );
+- ebl->DrawSegment( tdc, &tpoint, &m_cursorPoint, *m_pVP, false );
++ ebl->DrawSegment( dc, &tpoint, &m_cursorPoint, *m_pVP, false );
+ } else {
+ GetCanvasPixLL( g_pVP, &tpoint, g_pfFix.Lat, g_pfFix.Lon );
+ DistanceBearingMercator_Plugin( m_cursor_lat, m_cursor_lon, g_pfFix.Lat, g_pfFix.Lon, &brg, &dist );
+- ebl->DrawSegment( tdc, &tpoint, &m_cursorPoint, *m_pVP, false );
++ ebl->DrawSegment( dc, &tpoint, &m_cursorPoint, *m_pVP, false );
+ }
+- wxString info = CreateExtraPathLegInfo(tdc, ebl, brg, dist, m_cursorPoint);
++ wxString info = CreateExtraPathLegInfo(dc, ebl, brg, dist, m_cursorPoint);
+ if(info.length() > 0)
+- RenderExtraPathLegInfo( tdc, m_cursorPoint, info );
++ RenderExtraPathLegInfo( dc, m_cursorPoint, info );
+ delete ebl;
+ }
+-
+-
+ }
+
+ wxString ocpn_draw_pi::CreateExtraPathLegInfo(ODDC &dc, ODPath *path, double brg, double dist, wxPoint ref_point)