Skip to content

Fix crash [__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array #124

Description

@shadiabusamra

Crash occurred when rotate device after dismiss alert
Stack trace:
[SIAlertView layoutSubviews]
[SIAlertView validateLayout]

Solution:
Add [self.items removeAllObjects]; to teardown method
- (void)teardown { [self.containerView removeFromSuperview]; self.containerView = nil; self.titleLabel = nil; self.messageLabel = nil; [self.buttons removeAllObjects]; [self.items removeAllObjects]; [self.alertWindow removeFromSuperview]; self.alertWindow = nil; self.layoutDirty = NO; }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions