@ Fixed a bug that crashes when you save a map using Save As (introduced with r1277)

This commit is contained in:
codeimp 2010-08-13 05:47:55 +00:00
parent 19909bac0c
commit 9ec7ba38fe

View file

@ -1167,7 +1167,7 @@ namespace CodeImp.DoomBuilder
{
// Check if we're saving to the same file as the original.
// Because some muppets use Save As even when saving to the same file.
string currentfilename = Path.GetFullPath(map.FilePathName).ToLowerInvariant();
string currentfilename = (map.FilePathName.Length > 0) ? Path.GetFullPath(map.FilePathName).ToLowerInvariant() : "";
string savefilename = Path.GetFullPath(savefile.FileName).ToLowerInvariant();
if(currentfilename == savefilename)
{