Message ID | 1366662589-18315-4-git-send-email-peter.maydell@linaro.org |
---|---|
State | Accepted |
Commit | 8bb3f1e3742ca8d26af7156e14068435437918a1 |
Headers | show |
diff --git a/ui/cocoa.m b/ui/cocoa.m index e3e1204..9ff688d 100644 --- a/ui/cocoa.m +++ b/ui/cocoa.m @@ -810,7 +810,7 @@ QemuCocoaView *cocoaView; exit(0); } else if(returnCode == NSOKButton) { const char *bin = "qemu"; - char *img = (char*)[ [ sheet filename ] cStringUsingEncoding:NSASCIIStringEncoding]; + char *img = (char*)[ [ [ sheet URL ] path ] cStringUsingEncoding:NSASCIIStringEncoding]; char **argv = (char**)malloc( sizeof(char*)*3 );
Avoid the NSOpenPanel filename method (deprecated in MacOSX 10.6) in favour of using the URL method and extracting the path from the resulting NSUrl object. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> --- ui/cocoa.m | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)