Fixed crash when view was dealocced and delegate was set to nil.