Browse Source

SD2-775 - Null reference exception when creating a new folder. When a project directory is renamed/created the code now handles the case where there are IViewContents open with null filenames.

git-svn-id: svn://svn.sharpdevelop.net/sharpdevelop/branches/2.0@1325 1ccf3a8d-04fe-1044-b7c0-cef0b8235c61
shortcuts
Matt Ward 20 years ago
parent
commit
0b807ebf52
  1. 2
      src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs

2
src/Main/Base/Project/Src/Gui/Workbench/DefaultWorkbench.cs

@ -380,7 +380,7 @@ namespace ICSharpCode.SharpDevelop.Gui
{ {
if (e.IsDirectory) { if (e.IsDirectory) {
foreach (IViewContent content in ViewContentCollection) { foreach (IViewContent content in ViewContentCollection) {
if (content.FileName.StartsWith(e.SourceFile)) { if (content.FileName != null && content.FileName.StartsWith(e.SourceFile)) {
content.FileName = e.TargetFile + content.FileName.Substring(e.SourceFile.Length); content.FileName = e.TargetFile + content.FileName.Substring(e.SourceFile.Length);
} }
} }

Loading…
Cancel
Save