Permalink
Browse files

- Fixes issue #5 - JSTwitterCoreTextView crashes in detectLinks

  • Loading branch information...
1 parent d1690ec commit 8a002d158ef85153dcd01ef5659a95c7bf97d5f7 James Addyman committed Aug 11, 2011
Showing with 12 additions and 4 deletions.
  1. +5 −0 Classes/JSTwitterCoreTextView.m
  2. +7 −4 CoreTextHyperlinkView.xcodeproj/project.pbxproj
@@ -42,6 +42,11 @@ - (void)detectLinks
{
[super detectLinks];
+ if (![[self text] length])
+ {
+ return;
+ }
+
NSMutableArray *tempLinks = [_links mutableCopy];
NSArray *expressions = [[[NSArray alloc] initWithObjects:@"(@[a-zA-Z0-9_]+)", // screen names
@@ -3,7 +3,7 @@
archiveVersion = 1;
classes = {
};
- objectVersion = 45;
+ objectVersion = 46;
objects = {
/* Begin PBXBuildFile section */
@@ -179,8 +179,11 @@
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0410;
+ };
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "CoreTextHyperlinkView" */;
- compatibilityVersion = "Xcode 3.1";
+ compatibilityVersion = "Xcode 3.2";
developmentRegion = English;
hasScannedForEncodings = 1;
knownRegions = (
@@ -240,6 +243,7 @@
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = CoreTextHyperlinkView_Prefix.pch;
+ GCC_VERSION = com.apple.compilers.llvmgcc42;
INFOPLIST_FILE = "CoreTextHyperlinkView-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 4.2;
PRODUCT_NAME = CoreTextHyperlinkView;
@@ -254,6 +258,7 @@
COPY_PHASE_STRIP = YES;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = CoreTextHyperlinkView_Prefix.pch;
+ GCC_VERSION = com.apple.compilers.llvmgcc42;
INFOPLIST_FILE = "CoreTextHyperlinkView-Info.plist";
IPHONEOS_DEPLOYMENT_TARGET = 4.2;
PRODUCT_NAME = CoreTextHyperlinkView;
@@ -270,7 +275,6 @@
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
- PREBINDING = NO;
SDKROOT = iphoneos;
};
name = Debug;
@@ -284,7 +288,6 @@
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1";
- PREBINDING = NO;
SDKROOT = iphoneos;
};
name = Release;

0 comments on commit 8a002d1

Please sign in to comment.