[med-svn] r222 - trunk/packages/treeviewx/trunk/debian/patches

Charles Plessy charles-guest at alioth.debian.org
Sun Mar 4 14:59:53 CET 2007


Author: charles-guest
Date: 2007-03-04 13:59:53 +0000 (Sun, 04 Mar 2007)
New Revision: 222

Added:
   trunk/packages/treeviewx/trunk/debian/patches/70_choose_tree.dpatch
Modified:
   trunk/packages/treeviewx/trunk/debian/patches/00list
Log:
The patch from Ubuntu.

Modified: trunk/packages/treeviewx/trunk/debian/patches/00list
===================================================================
--- trunk/packages/treeviewx/trunk/debian/patches/00list	2007-03-04 13:58:21 UTC (rev 221)
+++ trunk/packages/treeviewx/trunk/debian/patches/00list	2007-03-04 13:59:53 UTC (rev 222)
@@ -1,3 +1,4 @@
 50_wxT_tv.cpp.dpatch
 51_wxT_tview.cpp.dpatch
 60_LGPLtoGPL.dpatch
+70_choose_tree.dpatch

Added: trunk/packages/treeviewx/trunk/debian/patches/70_choose_tree.dpatch
===================================================================
--- trunk/packages/treeviewx/trunk/debian/patches/70_choose_tree.dpatch	2007-03-04 13:58:21 UTC (rev 221)
+++ trunk/packages/treeviewx/trunk/debian/patches/70_choose_tree.dpatch	2007-03-04 13:59:53 UTC (rev 222)
@@ -0,0 +1,21 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 70_choose_tree.dpatch by William Alexander Grant <william.grant at ubuntu.com.au>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Check that there are actually some trees before we try to set the
+## DP: selected one. This prevents a segfault when there are no trees in
+## DP: the document.
+
+ at DPATCH@
+diff -urNad treeviewx-0.5.1~/tview.cpp treeviewx-0.5.1/tview.cpp
+--- treeviewx-0.5.1~/tview.cpp	2006-12-17 10:33:21.000000000 +1100
++++ treeviewx-0.5.1/tview.cpp	2006-12-17 10:33:53.000000000 +1100
+@@ -742,7 +742,7 @@
+ 
+     dialog.SetSelection(p.GetCurrentTreeNumber());
+ 
+-    if (dialog.ShowModal() == wxID_OK)
++    if ((dialog.ShowModal() == wxID_OK) && (p.GetNumTrees() != 0))
+     {
+ 		int j = dialog.GetSelection ();				
+ #ifdef __WXMAC__




More information about the debian-med-commit mailing list