]> granicus.if.org Git - transmission/commitdiff
#5053 Fix crash on 10.6
authorMitchell Livingston <livings124@transmissionbt.com>
Wed, 26 Sep 2012 16:55:34 +0000 (16:55 +0000)
committerMitchell Livingston <livings124@transmissionbt.com>
Wed, 26 Sep 2012 16:55:34 +0000 (16:55 +0000)
macosx/StatusBarView.m

index aafdb99889ef60904c2949fd56a732ba487ab0b1..e3d4a91ee8b22ceb07246c7be634aa8eef7972c3 100644 (file)
     
     NSRectFillListWithColors(gridRects, colorRects, count);
     
-    [fNoiseImage drawInRect: rect
-                   fromRect: [self convertRectToBacking: rect]
-                  operation: NSCompositeSourceOver
-                   fraction: 0.12];
+    if (fNoiseImage) {
+        NSAssert([NSApp isOnLionOrBetter], @"we have a noise image, but we're on 10.6"); //https://trac.transmissionbt.com/ticket/5053
+        [fNoiseImage drawInRect: rect
+                       fromRect: [self convertRectToBacking: rect]
+                      operation: NSCompositeSourceOver
+                       fraction: 0.12];
+    }
 }
 
 @end