From 0d5f9b24a86eb1bdfedf44731d2e5e6f9b9eb024 Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Fri, 2 Apr 2010 14:19:58 +0000 Subject: - Fix an intermittent crasher - occurring most often when sorting tables - by using copies of data store objects when the data store is being updated. This addresses http://log.sequelpro.com/view/20 and http://log.sequelpro.com/view/88 --- Source/CustomQuery.m | 2 +- Source/TableContent.m | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Source') diff --git a/Source/CustomQuery.m b/Source/CustomQuery.m index b6512f5a..bc71d6ee 100644 --- a/Source/CustomQuery.m +++ b/Source/CustomQuery.m @@ -1584,7 +1584,7 @@ if (isWorking) { pthread_mutex_lock(&resultDataLock); if (rowIndex < resultDataCount && columnIndex < [resultData columnCount]) { - theValue = SPDataStorageObjectAtRowAndColumn(resultData, rowIndex, columnIndex); + theValue = [[SPDataStorageObjectAtRowAndColumn(resultData, rowIndex, columnIndex) copy] autorelease]; } pthread_mutex_unlock(&resultDataLock); diff --git a/Source/TableContent.m b/Source/TableContent.m index f4afb508..a0948f36 100644 --- a/Source/TableContent.m +++ b/Source/TableContent.m @@ -2718,7 +2718,7 @@ if (isWorking) { pthread_mutex_lock(&tableValuesLock); if (rowIndex < tableRowsCount && columnIndex < [tableValues columnCount]) { - theValue = SPDataStorageObjectAtRowAndColumn(tableValues, rowIndex, columnIndex); + theValue = [[SPDataStorageObjectAtRowAndColumn(tableValues, rowIndex, columnIndex) copy] autorelease]; } pthread_mutex_unlock(&tableValuesLock); -- cgit v1.2.3