mirror of
https://github.com/tribufu/ServerGridEditor
synced 2026-05-06 07:07:32 +00:00
Instinct: EditIsland crash fix
This commit is contained in:
parent
c6c2338443
commit
8b2900fa6b
2 changed files with 7 additions and 7 deletions
Binary file not shown.
|
|
@ -215,7 +215,7 @@ namespace ServerGridEditor
|
|||
editedIsland.imagePath = newImgPath;
|
||||
}
|
||||
|
||||
if (modNameTxtBox.Text != editedIsland.modDir)
|
||||
if (editedIsland.modDir != null && editedIsland.modDir != null && modNameTxtBox.Text != editedIsland.modDir)
|
||||
{
|
||||
//Mod dir changed
|
||||
if (!string.IsNullOrWhiteSpace(modNameTxtBox.Text))
|
||||
|
|
@ -246,19 +246,19 @@ namespace ServerGridEditor
|
|||
else
|
||||
{
|
||||
editedIsland.InvalidateImage();
|
||||
string newImgPath = MainForm.imgsDir + "/" + editedIsland.name + "_img.jpg";
|
||||
string newImgPath = MainForm.imgsDir + "/" + editedIsland.name + "_img.jpg";
|
||||
if (File.Exists(newImgPath))
|
||||
File.Delete(newImgPath);
|
||||
File.Move(editedIsland.imagePath, newImgPath);
|
||||
File.Move(editedIsland.imagePath, newImgPath);
|
||||
|
||||
islandRemovedFromMod = editedIsland.modDir;
|
||||
editedIsland.modDir = null;
|
||||
|
||||
if (pictureBox1.ImageLocation == editedIsland.imagePath)
|
||||
pictureBox1.ImageLocation = newImgPath;
|
||||
if (pictureBox1.ImageLocation == editedIsland.imagePath)
|
||||
pictureBox1.ImageLocation = newImgPath;
|
||||
|
||||
editedIsland.imagePath = newImgPath;
|
||||
}
|
||||
editedIsland.imagePath = newImgPath;
|
||||
}
|
||||
}
|
||||
|
||||
editedIsland.x = x;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue