aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2016-02-01 17:57:41 +0100
committerMax <post@wickenrode.com>2016-02-01 17:57:41 +0100
commit8316be26e61ce9d2aebd6f3b3c443407edec3dbe (patch)
tree4deced9b7f9b6e037b3a06bbb288be74f50aa7df
parent9620e624a32fd0808e508bc5f0889ea847a185b2 (diff)
downloadsequelpro-8316be26e61ce9d2aebd6f3b3c443407edec3dbe.tar.gz
sequelpro-8316be26e61ce9d2aebd6f3b3c443407edec3dbe.tar.bz2
sequelpro-8316be26e61ce9d2aebd6f3b3c443407edec3dbe.zip
Fix a rare crash due to calling a NULL method pointer (#2390)
-rw-r--r--Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResultStore.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResultStore.h b/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResultStore.h
index d66dfd81..5fa6f406 100644
--- a/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResultStore.h
+++ b/Frameworks/SPMySQLFramework/Source/SPMySQLStreamingResultStore.h
@@ -79,7 +79,7 @@ static inline unsigned long long SPMySQLResultStoreGetRowCount(SPMySQLStreamingR
{
typedef unsigned long long (*SPMSRSRowCountMethodPtr)(SPMySQLStreamingResultStore*, SEL);
static SPMSRSRowCountMethodPtr SPMSRSRowCount;
- if (!SPMSRSRowCount) SPMSRSRowCount = (SPMSRSRowCountMethodPtr)[self methodForSelector:@selector(numberOfRows)];
+ if (!SPMSRSRowCount) SPMSRSRowCount = (SPMSRSRowCountMethodPtr)[SPMySQLStreamingResultStore instanceMethodForSelector:@selector(numberOfRows)];
return SPMSRSRowCount(self, @selector(numberOfRows));
}
@@ -87,7 +87,7 @@ static inline id SPMySQLResultStoreGetRow(SPMySQLStreamingResultStore* self, NSU
{
typedef id (*SPMSRSRowFetchMethodPtr)(SPMySQLStreamingResultStore*, SEL, NSUInteger);
static SPMSRSRowFetchMethodPtr SPMSRSRowFetch;
- if (!SPMSRSRowFetch) SPMSRSRowFetch = (SPMSRSRowFetchMethodPtr)[self methodForSelector:@selector(rowContentsAtIndex:)];
+ if (!SPMSRSRowFetch) SPMSRSRowFetch = (SPMSRSRowFetchMethodPtr)[SPMySQLStreamingResultStore instanceMethodForSelector:@selector(rowContentsAtIndex:)];
return SPMSRSRowFetch(self, @selector(rowContentsAtIndex:), rowIndex);
}
@@ -95,7 +95,7 @@ static inline id SPMySQLResultStoreObjectAtRowAndColumn(SPMySQLStreamingResultSt
{
typedef id (*SPMSRSObjectFetchMethodPtr)(SPMySQLStreamingResultStore*, SEL, NSUInteger, NSUInteger);
static SPMSRSObjectFetchMethodPtr SPMSRSObjectFetch;
- if (!SPMSRSObjectFetch) SPMSRSObjectFetch = (SPMSRSObjectFetchMethodPtr)[self methodForSelector:@selector(cellDataAtRow:column:)];
+ if (!SPMSRSObjectFetch) SPMSRSObjectFetch = (SPMSRSObjectFetchMethodPtr)[SPMySQLStreamingResultStore instanceMethodForSelector:@selector(cellDataAtRow:column:)];
return SPMSRSObjectFetch(self, @selector(cellDataAtRow:column:), rowIndex, colIndex);
}
@@ -103,6 +103,6 @@ static inline id SPMySQLResultStorePreviewAtRowAndColumn(SPMySQLStreamingResultS
{
typedef id (*SPMSRSObjectPreviewMethodPtr)(SPMySQLStreamingResultStore*, SEL, NSUInteger, NSUInteger, NSUInteger);
static SPMSRSObjectPreviewMethodPtr SPMSRSObjectPreview;
- if (!SPMSRSObjectPreview) SPMSRSObjectPreview = (SPMSRSObjectPreviewMethodPtr)[self methodForSelector:@selector(cellPreviewAtRow:column:previewLength:)];
+ if (!SPMSRSObjectPreview) SPMSRSObjectPreview = (SPMSRSObjectPreviewMethodPtr)[SPMySQLStreamingResultStore instanceMethodForSelector:@selector(cellPreviewAtRow:column:previewLength:)];
return SPMSRSObjectPreview(self, @selector(cellPreviewAtRow:column:previewLength:), rowIndex, colIndex, previewLength);
}