Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add defensive property check to TableViewCellModule layoutSubviews #802

Merged
merged 1 commit into from
Aug 31, 2017

Conversation

svicalifornia
Copy link
Contributor

In some cases, the layoutSubviews of TableViewCellModule gets called before its data_cell instance variable has been set. As a result, layoutSubviews will raise an exception when trying to access methods of data_cell.

This change checks that data_cell is truthy before proceeding.

(Using RubyMotion 4.22 with iOS 10.2 Simulator and iOS 10.3.3 on device.)

@jamonholmgren jamonholmgren merged commit ec781d1 into jamonholmgren:master Aug 31, 2017
@jamonholmgren
Copy link
Owner

Excellent, thanks @svicalifornia !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants