diff options
author | Michael Drake <tlsa@netsurf-browser.org> | 2012-10-11 12:03:36 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2012-10-11 12:03:36 +0100 |
commit | eecb074f7babb3981fd1851accd5e4a0569b00d0 (patch) | |
tree | f703cf345f7d0d219c754c9f470c22b1fb15b1aa /cocoa | |
parent | 20425b69141b301de9ae696d413565026dceebf7 (diff) | |
download | netsurf-eecb074f7babb3981fd1851accd5e4a0569b00d0.tar.gz |
Fixup for URLdb.
Diffstat (limited to 'cocoa')
-rw-r--r-- | cocoa/URLFieldCell.m | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cocoa/URLFieldCell.m b/cocoa/URLFieldCell.m index 95e26cccf..fca9ebd5d 100644 --- a/cocoa/URLFieldCell.m +++ b/cocoa/URLFieldCell.m @@ -78,8 +78,15 @@ { NSString *url = [self stringValue]; NSString *title = url; + nsurl *nsurl; + + if (nsurl_create( [url UTF8String] , &nsurl ) != NSERROR_OK) + return; const struct url_data *data = urldb_get_url_data( [url UTF8String] ); + + nsurl_unref(nsurl); + if (data && data->title) title = [NSString stringWithUTF8String: data->title]; NSPasteboard *pb = [NSPasteboard pasteboardWithName: NSDragPboard]; |