Skip to content
Permalink
Browse files

#2414 fix crash hovering mouse over removed table column header

  • Loading branch information...
abhibeckert committed Jun 5, 2016
1 parent 84b40f5 commit d2762d63153241b8194fefab28039730ae0187e9
Showing with 5 additions and 0 deletions.
  1. +1 −0 Source/SPCustomQuery.m
  2. +4 −0 Source/SPTableContent.m
@@ -1670,6 +1670,7 @@ - (void) updateTableView
// Remove all existing columns from the table
theColumns = [customQueryView tableColumns];
while ([theColumns count]) {
[NSArrayObjectAtIndex(theColumns, 0) setHeaderToolTip:nil]; // prevent crash #2414
[customQueryView removeTableColumn:NSArrayObjectAtIndex(theColumns, 0)];
}

@@ -447,6 +447,7 @@ - (void) setTableDetails:(NSDictionary *)tableDetails
if (!newTableName) {
// Remove existing columns from the table
while ([[tableContentView tableColumns] count]) {
[NSArrayObjectAtIndex([tableContentView tableColumns], 0) setHeaderToolTip:nil]; // prevent crash #2414
[tableContentView removeTableColumn:NSArrayObjectAtIndex([tableContentView tableColumns], 0)];
}

@@ -505,6 +506,7 @@ - (void) setTableDetails:(NSDictionary *)tableDetails
#ifndef SP_CODA
// Clear filter table
while ([[filterTableView tableColumns] count]) {
[NSArrayObjectAtIndex([filterTableView tableColumns], 0) setHeaderToolTip:nil]; // prevent crash #2414
[filterTableView removeTableColumn:NSArrayObjectAtIndex([filterTableView tableColumns], 0)];
}
// Clear filter table data
@@ -519,12 +521,14 @@ - (void) setTableDetails:(NSDictionary *)tableDetails

// Remove existing columns from the table
while ([[tableContentView tableColumns] count]) {
[NSArrayObjectAtIndex([tableContentView tableColumns], 0) setHeaderToolTip:nil]; // prevent crash #2414
[tableContentView removeTableColumn:NSArrayObjectAtIndex([tableContentView tableColumns], 0)];
}
#ifndef SP_CODA
// Remove existing columns from the filter table
[filterTableView abortEditing];
while ([[filterTableView tableColumns] count]) {
[NSArrayObjectAtIndex([filterTableView tableColumns], 0) setHeaderToolTip:nil]; // prevent crash #2414
[filterTableView removeTableColumn:NSArrayObjectAtIndex([filterTableView tableColumns], 0)];
}
// Clear filter table data

0 comments on commit d2762d6

Please sign in to comment.
You can’t perform that action at this time.