ensure that NSApp is loaded for the QuickLook plugin

This commit is contained in:
Mitchell Livingston
2012-09-06 01:15:31 +00:00
parent fdb29936ba
commit d3def60514
2 changed files with 7 additions and 6 deletions

View File

@@ -37,6 +37,9 @@ OSStatus GeneratePreviewForURL(void *thisInterface, QLPreviewRequestRef preview,
if (QLPreviewRequestIsCancelled(preview))
return noErr;
//we need this call to ensure NSApp is initialized (not done automatically for plugins)
[NSApplication sharedApplication];
//try to parse the torrent file
tr_info inf;
tr_ctor * ctor = tr_ctorNew(NULL);