tag 388546 patch
thanks

The attachment prevents the above-mentioned segfault and hides the empty
menu.
diff -u rapidsvn-0.9.4.orig/src/filelist_ctrl.cpp rapidsvn-0.9.4/src/filelist_ctrl.cpp
--- rapidsvn-0.9.4.orig/src/filelist_ctrl.cpp	2006-12-08 18:47:07.000000000 +0100
+++ rapidsvn-0.9.4/src/filelist_ctrl.cpp	2008-01-03 21:15:06.000000000 +0100
@@ -1368,7 +1368,10 @@
   RapidSvnFrame* frame = (RapidSvnFrame*) wxGetApp ().GetTopWindow ();
   frame->TrimDisabledMenuItems (menu);
 
-  PopupMenu (&menu);
+  if (menu.GetMenuItemCount ())
+  {
+    PopupMenu (&menu);
+  }
 }
 
 inline void
diff -u rapidsvn-0.9.4.orig/src/rapidsvn_frame.cpp rapidsvn-0.9.4/src/rapidsvn_frame.cpp
--- rapidsvn-0.9.4.orig/src/rapidsvn_frame.cpp	2006-12-08 18:47:07.000000000 +0100
+++ rapidsvn-0.9.4/src/rapidsvn_frame.cpp	2008-01-03 21:32:58.000000000 +0100
@@ -919,7 +919,7 @@
   while (pos-- > 0)
   {
     wxMenuItem *pItem = menu.FindItemByPosition (pos);
-    if (pItem->IsSeparator ())
+    if (pItem && pItem->IsSeparator ())
     {
       // If we're at a separator at the top, trash it & look for any more we skipped along the way
       if (pos == 0)

Reply via email to