iOS: Guard against UIGestureRecognizer messing with self

We pass in self to initWithTarget, so we need to be sure that the
init doesn't return a new self.

Change-Id: I90d0d10d2fd1a5d38ef1ff3f23169dcce00b28e2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
bb10
Tor Arne Vestbø 2014-12-01 14:48:06 +01:00 committed by Tor Arne Vestbø
parent df75cb4c09
commit afae4ee0b1
1 changed files with 3 additions and 0 deletions

View File

@ -74,7 +74,10 @@ static QUIView *focusView()
- (id)initWithQIOSInputContext:(QIOSInputContext *)context
{
id originalSelf = self;
if (self = [super initWithTarget:self action:@selector(gestureStateChanged:)]) {
Q_ASSERT(self == originalSelf);
m_context = context;
// UIGestureRecognizer