Author: lluis
Date: 2007-10-03 11:47:33 -0400 (Wed, 03 Oct 2007)
New Revision: 86820

Modified:
   trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
   trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs
Log:
* MonoDevelop.Ide.Gui/Workbench.cs: Avoid crash in ShowNext/Previous
  when the provided location does not have a valid file name.

Modified: trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog        2007-10-03 
15:45:59 UTC (rev 86819)
+++ trunk/monodevelop/Core/src/MonoDevelop.Ide/ChangeLog        2007-10-03 
15:47:33 UTC (rev 86820)
@@ -1,3 +1,8 @@
+2007-10-03  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
+
+       * MonoDevelop.Ide.Gui/Workbench.cs: Avoid crash in ShowNext/Previous 
when
+         the provided location does not have a valid file name.
+
 2007-10-02  Lluis Sanchez Gual <[EMAIL PROTECTED]> 
 
        * MonoDevelop.Ide.Gui.Content/CompletionTextEditorExtension.cs,

Modified: 
trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs
===================================================================
--- trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs 
2007-10-03 15:45:59 UTC (rev 86819)
+++ trunk/monodevelop/Core/src/MonoDevelop.Ide/MonoDevelop.Ide.Gui/Workbench.cs 
2007-10-03 15:47:33 UTC (rev 86820)
@@ -463,8 +463,10 @@
                                ILocationListPad loc = (ILocationListPad) 
pad.Content;
                                string file;
                                int lin, col;
-                               if (loc.GetNextLocation (out file, out lin, out 
col))
-                                       OpenDocument (file, lin, col, true);
+                               if (loc.GetNextLocation (out file, out lin, out 
col)) {
+                                       if (!string.IsNullOrEmpty (file))
+                                               OpenDocument (file, lin, col, 
true);
+                               }
                        }
                }
                
@@ -478,8 +480,10 @@
                                ILocationListPad loc = (ILocationListPad) 
pad.Content;
                                string file;
                                int lin, col;
-                               if (loc.GetPreviousLocation (out file, out lin, 
out col))
-                                       OpenDocument (file, lin, col, true);
+                               if (loc.GetPreviousLocation (out file, out lin, 
out col)) {
+                                       if (!string.IsNullOrEmpty (file))
+                                               OpenDocument (file, lin, col, 
true);
+                               }
                        }
                }
                

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to