Skip to content

Commit

Permalink
Fix crash due to nil value.
Browse files Browse the repository at this point in the history
  • Loading branch information
emsquared committed Jun 26, 2012
1 parent 0b797db commit 884c37d
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
10 changes: 7 additions & 3 deletions Classes/IRC/IRCClient.m
Original file line number Diff line number Diff line change
Expand Up @@ -1168,7 +1168,7 @@ - (void)decryptIncomingMessage:(NSString **)message channel:(IRCChannel *)chan
#pragma mark -
#pragma mark Plugins and Scripts

- (void)executeTextualCmdScript:(NSDictionary *)details
-(void)executeTextualCmdScript:(NSDictionary *)details
{
if ([details containsKey:@"path"] == NO) {
return;
Expand All @@ -1179,8 +1179,12 @@ - (void)executeTextualCmdScript:(NSDictionary *)details
#ifdef TXUserScriptsFolderAvailable
BOOL MLNonsandboxedScript = NO;

if ([scriptPath contains:[TPCPreferences whereScriptsUnsupervisedPath]]) {
MLNonsandboxedScript = YES;
NSString *userScriptsPath = [TPCPreferences whereScriptsUnsupervisedPath];

if (NSObjectIsNotEmpty(userScriptsPath)) {
if ([scriptPath contains:[TPCPreferences whereScriptsUnsupervisedPath]]) {
MLNonsandboxedScript = YES;
}
}
#endif

Expand Down
2 changes: 1 addition & 1 deletion Classes/Preferences/TPCPreferences.m
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ + (NSString *)whereScriptsUnsupervisedPath
error:NULL].relativePath;
}

return nil;
return NSStringEmptyPlaceholder;
}
#endif

Expand Down
4 changes: 2 additions & 2 deletions Resources/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@
<key>NSPrincipalClass</key>
<string>NSApplication</string>
<key>TXBundleBuildNumber</key>
<string>11454</string>
<string>11457</string>
<key>TXBundleBuildReference</key>
<string>2.1.1-188-g8736839-stdbuild,llvm4.0</string>
<string>2.1.1-188-g0b797db-stdbuild,llvm4.0</string>
</dict>
</plist>

0 comments on commit 884c37d

Please sign in to comment.