Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/16/11 03:14:15 (13 years ago)
Author:
swagner
Message:

Fixed exception which was thrown when item updates are still pending after the content of an ItemCollectionView has already been changed (#1324)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Core.Views/3.3/ItemCollectionView.cs

    r5287 r5302  
    128128        try {
    129129          return (T)typeSelectorDialog.TypeSelector.CreateInstanceOfSelectedType();
    130         } catch (Exception ex) {
     130        }
     131        catch (Exception ex) {
    131132          ErrorHandling.ShowErrorDialog(this, ex);
    132133        }
     
    195196        return listViewItems;
    196197      } else {
    197         return itemListViewItemMapping[item];
     198        List<ListViewItem> listViewItems = null;
     199        itemListViewItemMapping.TryGetValue(item, out listViewItems);
     200        return listViewItems == null ? Enumerable.Empty<ListViewItem>() : listViewItems;
    198201      }
    199202    }
Note: See TracChangeset for help on using the changeset viewer.