Skip to content

Commit

Permalink
Unregister as delegate so the ULIPaintView can't send us messages aft…
Browse files Browse the repository at this point in the history
…er we've been released.
  • Loading branch information
uliwitness committed Aug 8, 2011
1 parent 61fc98e commit c170a8e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions Presentation/WILDCardViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,9 @@ -(void) dealloc
DESTROY_DEALLOC(mAddColorOverlay);
DESTROY_DEALLOC(mSearchContext);
DESTROY_DEALLOC(mCurrentSearchString);
[mBackgroundPictureView setDelegate: nil];
DESTROY_DEALLOC(mBackgroundPictureView);
[mCardPictureView setDelegate: nil];
DESTROY_DEALLOC(mCardPictureView);

[super dealloc];
Expand Down Expand Up @@ -458,6 +460,7 @@ -(void) loadCard: (WILDCard*)theCard
WILDStack* theStack = [theCard stack];
WILDBackground* theBg = [theCard owningBackground];

[mBackgroundPictureView setDelegate: nil];
DESTROY(mBackgroundPictureView);
mBackgroundPictureView = [[WILDPictureView alloc] initWithFrame: [[self view] bounds]];
NSImage* bgPicture = [theBg picture];
Expand All @@ -482,6 +485,7 @@ -(void) loadCard: (WILDCard*)theCard
// Load the actual card parts:
if( !mBackgroundEditMode )
{
[mCardPictureView setDelegate: nil];
DESTROY(mCardPictureView);
mCardPictureView = [[WILDPictureView alloc] initWithFrame: [[self view] bounds]];
NSImage* cdPicture = [theCard picture];
Expand Down

0 comments on commit c170a8e

Please sign in to comment.