summaryrefslogtreecommitdiffstats
path: root/macosx/tkMacOSXSysTray.c
diff options
context:
space:
mode:
authorKevin Walzer <kw@codebykevin.com>2021-06-01 21:58:36 (GMT)
committerKevin Walzer <kw@codebykevin.com>2021-06-01 21:58:36 (GMT)
commit74c1b206af3d134fce5ad8fcf36b5171ce44b303 (patch)
tree4cf41e83c09c04bf21d1b902bf803263915cc0f9 /macosx/tkMacOSXSysTray.c
parent7fb58e98d29359350aea04dbbd5f083a08ebdbfb (diff)
downloadtk-74c1b206af3d134fce5ad8fcf36b5171ce44b303.zip
tk-74c1b206af3d134fce5ad8fcf36b5171ce44b303.tar.gz
tk-74c1b206af3d134fce5ad8fcf36b5171ce44b303.tar.bz2
Add some error checking
Diffstat (limited to 'macosx/tkMacOSXSysTray.c')
-rw-r--r--macosx/tkMacOSXSysTray.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/macosx/tkMacOSXSysTray.c b/macosx/tkMacOSXSysTray.c
index e433207..df2766c 100644
--- a/macosx/tkMacOSXSysTray.c
+++ b/macosx/tkMacOSXSysTray.c
@@ -436,7 +436,12 @@ static int SysNotifyObjCmd(
[notify appendString:title];
[notify appendString:@"\""];
NSAppleScript *scpt = [[[NSAppleScript alloc] initWithSource:notify] autorelease];
- NSAppleEventDescriptor *result = [scpt executeAndReturnError:nil];
+ NSDictionary *errorInfo;
+ NSAppleEventDescriptor *result = [scpt executeAndReturnError:&errorInfo];
+ if (!result) {
+ NSLog(@"ERROR: %@", errorInfo);
+ return TCL_ERROR;
+ }
return TCL_OK;
}