aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2010-04-01 19:24:46 +0000
committerstuconnolly <stuart02@gmail.com>2010-04-01 19:24:46 +0000
commit1c224127441a46fcc11f3317998ff50d3c7f499a (patch)
treea63ca078a984e53ded730b373d3022b8df302727
parent06e417594cd0fcdede2f0713c63a861bc65d7e99 (diff)
downloadsequelpro-1c224127441a46fcc11f3317998ff50d3c7f499a.tar.gz
sequelpro-1c224127441a46fcc11f3317998ff50d3c7f499a.tar.bz2
sequelpro-1c224127441a46fcc11f3317998ff50d3c7f499a.zip
Although the table content field drop down should always be populated and selected, make sure to check that the value returned is not nil/NULL before we perform any regex with it. Fixes exception http://log.sequelpro.com/view/95.
-rw-r--r--Source/TableContent.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m
index 536551c7..f4afb508 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -845,7 +845,7 @@
[clause replaceOccurrencesOfRegex:@"(?<!\\\\)\\$BINARY" withString:(caseSensitive) ? @"BINARY" : @""];
[clause flushCachedRegexData];
- [clause replaceOccurrencesOfRegex:@"(?<!\\\\)\\$CURRENT_FIELD" withString:[[fieldField titleOfSelectedItem] backtickQuotedString]];
+ [clause replaceOccurrencesOfRegex:@"(?<!\\\\)\\$CURRENT_FIELD" withString:([fieldField titleOfSelectedItem]) ? [[fieldField titleOfSelectedItem] backtickQuotedString] : @""];
[clause flushCachedRegexData];
// Escape % sign