From eecb074f7babb3981fd1851accd5e4a0569b00d0 Mon Sep 17 00:00:00 2001 From: Michael Drake Date: Thu, 11 Oct 2012 12:03:36 +0100 Subject: Fixup for URLdb. --- cocoa/URLFieldCell.m | 7 +++++++ 1 file changed, 7 insertions(+) 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]; -- cgit v1.2.3