diff options
author | Abhi Beckert <me@abhibeckert.com> | 2016-06-05 10:49:30 +1000 |
---|---|---|
committer | Abhi Beckert <me@abhibeckert.com> | 2016-06-05 10:49:30 +1000 |
commit | d2762d63153241b8194fefab28039730ae0187e9 (patch) | |
tree | b7c1f63ab1d1d3d7c4d6a6307fe934f83d63c742 /Source | |
parent | 84b40f5fb614594ed02228c1ff8f09935e67e25a (diff) | |
download | sequelpro-d2762d63153241b8194fefab28039730ae0187e9.tar.gz sequelpro-d2762d63153241b8194fefab28039730ae0187e9.tar.bz2 sequelpro-d2762d63153241b8194fefab28039730ae0187e9.zip |
#2414 fix crash hovering mouse over removed table column header
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPCustomQuery.m | 1 | ||||
-rw-r--r-- | Source/SPTableContent.m | 4 |
2 files changed, 5 insertions, 0 deletions
diff --git a/Source/SPCustomQuery.m b/Source/SPCustomQuery.m index 822348be..4150d5a4 100644 --- a/Source/SPCustomQuery.m +++ b/Source/SPCustomQuery.m @@ -1670,6 +1670,7 @@ // 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)]; } diff --git a/Source/SPTableContent.m b/Source/SPTableContent.m index 88d5d2ea..09d088d0 100644 --- a/Source/SPTableContent.m +++ b/Source/SPTableContent.m @@ -447,6 +447,7 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper 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 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper #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 @@ static NSString *SPTableFilterSetDefaultOperator = @"SPTableFilterSetDefaultOper // 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 |