Changeset 2013 for trunk/eraser


Ignore:
Timestamp:
5/2/2010 9:54:07 AM (5 years ago)
Author:
lowjoel
Message:

Fixed crash on startup when upgrading from 6.0 to 6.2.

Location:
trunk/eraser
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/eraser/Eraser.Manager/Settings.cs

    r1987 r2013  
    495495                Settings = settings; 
    496496                SettingName = settingName; 
    497                 List = new List<T>(settings.GetValue<T[]>(settingName)); 
    498                 if (List == null) 
    499                     List = new List<T>(); 
     497                List = new List<T>(); 
     498 
     499                T[] values = settings.GetValue<T[]>(settingName); 
     500                if (values != null) 
     501                    List.AddRange(values); 
    500502            } 
    501503 
  • trunk/eraser/Eraser/Settings.cs

    r1987 r2013  
    101101                            return (T)formatter.Deserialize(stream); 
    102102                        } 
    103                         catch (SerializationException) 
     103                        catch (InvalidCastException) 
    104104                        { 
    105105                            Key.DeleteValue(name); 
Note: See TracChangeset for help on using the changeset viewer.