~and471/+junk/do-with-docky

« back to all changes in this revision

Viewing changes to Do.Platform.Linux/src/Do.Universe/CategoryItem.cs

  • Committer: rugby471 at gmail
  • Date: 2010-10-15 16:08:38 UTC
  • Revision ID: rugby471@gmail.com-20101015160838-z9m3utbf7bxzb5ty
reverted to before docky removal

Show diffs side-by-side

added added

removed removed

Lines of Context:
48
48
                public static CategoryItem GetCategoryItem (string category)
49
49
                {
50
50
                        string lowCat = category.ToLower ();
51
 
                        if (!Instances.ContainsKey (lowCat)) {
52
 
                                CategoryItem item = new CategoryItem (category);
53
 
                                Instances [lowCat] = item;
 
51
                        lock (Instances)
 
52
                        {
 
53
                                if (!Instances.ContainsKey (lowCat)) {
 
54
                                        CategoryItem item = new CategoryItem (category);
 
55
                                        Instances [lowCat] = item;
 
56
                                }
54
57
                        }
55
58
                        return Instances [lowCat];
56
59
                }