Skip to content
Permalink
Browse files

Fix warnings.

  • Loading branch information
stuconnolly committed Mar 22, 2017
1 parent bde46d2 commit bab93f8ce74a6644c9a3d8a50fa26230f127c550
Showing with 16 additions and 8 deletions.
  1. +16 −8 Source/SPBundleCommandRunner.m
@@ -164,21 +164,29 @@ + (NSString *)runBashCommand:(NSString *)command withEnvironment:(NSDictionary*)
if([doc getConnection] == nil)
doc = nil;
else {
for (NSWindow *aWindow in [NSApp orderedWindows]) {
if([[[[aWindow windowController] class] description] isEqualToString:@"SPWindowController"]) {
if([[[aWindow windowController] documents] count] && [[[[[[aWindow windowController] documents] objectAtIndex:0] class] description] isEqualToString:@"SPDatabaseDocument"]) {
for (NSWindow *aWindow in [NSApp orderedWindows])
{
if ([[[[aWindow windowController] class] description] isEqualToString:@"SPWindowController"]) {

SPWindowController *windowController = (SPWindowController *)[aWindow windowController];
NSArray *documents = [windowController documents];

if ([documents count] && [[[[documents objectAtIndex:0] class] description] isEqualToString:@"SPDatabaseDocument"]) {
// Check if connected
if([[[[aWindow windowController] documents] objectAtIndex:0] getConnection])
doc = [[[aWindow windowController] documents] objectAtIndex:0];
else
if ([[documents objectAtIndex:0] getConnection]) {
doc = [documents objectAtIndex:0];
}
else {
doc = nil;
}
}
}
if(doc) break;

if (doc) break;
}
}

if(doc != nil) {
if (doc != nil) {

[doc setProcessID:uuid];

0 comments on commit bab93f8

Please sign in to comment.
You can’t perform that action at this time.