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

TIMOB-13055-3_1_X: Add null check for tableViewItem #4079

Merged
merged 1 commit into from
Apr 4, 2013
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -204,15 +204,18 @@ public boolean fireEvent(String eventName, Object data, boolean bubbles)
{
// Inject row click data for events coming from row children.
TableViewProxy table = getTable();
Item item = tableViewItem.getRowData();
if (table != null && item != null && data instanceof HashMap) {
// The data object may already be in use by the runtime thread
// due to a child view's event fire. Create a copy to be thread safe.
@SuppressWarnings("unchecked")
KrollDict dataCopy = new KrollDict((HashMap<String, Object>) data);
fillClickEvent(dataCopy, table.getTableView().getModel(), item);
data = dataCopy;
if (tableViewItem != null) {
Item item = tableViewItem.getRowData();
if (table != null && item != null && data instanceof HashMap) {
// The data object may already be in use by the runtime thread
// due to a child view's event fire. Create a copy to be thread safe.
@SuppressWarnings("unchecked")
KrollDict dataCopy = new KrollDict((HashMap<String, Object>) data);
fillClickEvent(dataCopy, table.getTableView().getModel(), item);
data = dataCopy;
}
}

return super.fireEvent(eventName, data, bubbles);
}

Expand Down