Permalink
Browse files

Always check against nil

  • Loading branch information...
1 parent 9046184 commit 061a8017744fc17ba26fb29f704f2d395cb4de67 @stevemoser stevemoser committed Dec 17, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 DDExpandableButton/DDExpandableButton.m
@@ -90,7 +90,7 @@ @implementation DDExpandableButton
- (id)initWithFrame:(CGRect)frame
{
self = [super initWithFrame:frame];
- if (self)
+ if (self != nil)
{
// Flash Button like parameters
expanded = NO;
@@ -119,7 +119,7 @@ - (id)initWithFrame:(CGRect)frame
- (id)initWithPoint:(CGPoint)point leftTitle:(id)leftTitle buttons:(NSArray *)buttons
{
self = [self initWithFrame:CGRectMake(point.x, point.y, 0, 0)];
- if (self)
+ if (self != nil)
{
[self setLeftTitle:leftTitle];
[self setButtons:buttons];

0 comments on commit 061a801

Please sign in to comment.