diff --git a/SanSystem/UCSchachtanbindung.cs b/SanSystem/UCSchachtanbindung.cs index 5dc2832..611c1e7 100644 --- a/SanSystem/UCSchachtanbindung.cs +++ b/SanSystem/UCSchachtanbindung.cs @@ -106,7 +106,7 @@ namespace SanSystem schacht.SavedBilders.Remove(bild); pt_box.Image = null; pt_box.Dispose(); - File.Delete(Path.Combine(Global.Instance.Projektpfad, bild.Speicherpfad)); + //File.Delete(bild.Speicherpfad); lb_pictures.DataSource = null; lb_pictures.DataSource = schacht.SavedBilders; } @@ -118,6 +118,7 @@ namespace SanSystem ListBox listBox = (ListBox)sender; if (listBox == null) return; int index = listBox.SelectedIndex; + if (index == -1) return; string pfad = Path.Combine(schacht.SavedBilders[index].Speicherpfad); if (!File.Exists(pfad))