diff options
author | Kevin Walzer <kw@codebykevin.com> | 2019-03-02 15:46:09 (GMT) |
---|---|---|
committer | Kevin Walzer <kw@codebykevin.com> | 2019-03-02 15:46:09 (GMT) |
commit | b68aaeaedcdac1313229b58d0daacf7aa621f980 (patch) | |
tree | 9e251bc32a2e382f1a11e21d3f798d1c73fde942 /macosx | |
parent | 338a8ed35ef267dd39e258db7b2a75e0f65de3a7 (diff) | |
download | tk-b68aaeaedcdac1313229b58d0daacf7aa621f980.zip tk-b68aaeaedcdac1313229b58d0daacf7aa621f980.tar.gz tk-b68aaeaedcdac1313229b58d0daacf7aa621f980.tar.bz2 |
Update
Diffstat (limited to 'macosx')
-rw-r--r-- | macosx/tkMacOSXLaunch.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/macosx/tkMacOSXLaunch.c b/macosx/tkMacOSXLaunch.c index 6ece24f..b43b78b 100644 --- a/macosx/tkMacOSXLaunch.c +++ b/macosx/tkMacOSXLaunch.c @@ -109,6 +109,10 @@ int TkMacOSXGetDefaultApp(ClientData cd, Tcl_Interp *ip, int objc, Tcl_Obj *CONS kCFStringEncodingUTF8);
/*Get default app for URL.*/
CFURLRef defaultApp = CFURLCreateWithString(kCFAllocatorDefault, url, NULL);
+ if (!defaultApp) {
+ NSLog(@"Error: please provide well-formed URL in url:// format.")
+ return TCL_OK;
+ };
CFStringRef appURL = LSCopyDefaultApplicationURLForURL(defaultApp, kLSRolesAll, nil);
/* Convert the URL reference into a string reference. */
|