Permalink
Browse files

Double-check that an entry was made

  • Loading branch information...
1 parent ec0d852 commit bd85751964e71bd93fc6504e7fcc7b052a2c93ba @nikreiman nikreiman committed May 14, 2012
Showing with 6 additions and 0 deletions.
  1. +6 −0 _src/PostToSally/AppDelegate.m
View
6 _src/PostToSally/AppDelegate.m
@@ -176,8 +176,14 @@ - (IBAction)goButtonPressed:(id)sender {
[self addFileToGit:pictureDest];
}
+ if([_entryTextField stringValue] == nil) {
+ [self startTask:@"Error making post!"];
+ return;
+ }
+
fprintf(postFile, "%s\n", [[_entryTextField stringValue] cStringUsingEncoding:NSASCIIStringEncoding]);
fclose(postFile);
+
[self addFileToGit:postFileName];
[self gitCommit:subject];
[self gitPush];

0 comments on commit bd85751

Please sign in to comment.