Inferis/ViewDeck — pull request #57 by dflems (2012-03-21 18:17:50+00:00)
Title: Fix for nil check infinite loop

These lines:

IIViewDeckController.m:1078
if (![title isEqualToString:self.centerController.title]) self.centerController.title = title;

IIViewDeckController.m:1312
if (![[super title] isEqualToString:self.centerController.title]) {

can cause an infinite loop because they will always return true when the title is nil. The former will set the center controller's title, triggering the latter through the observer on the center controller's title, which will again trigger the former, repeat ad nauseum. I added a simple macro that also performs a nil check when checking for string equality.