]> git.sesse.net Git - vlc/commitdiff
* ./plugins/macosx/intf_vlc_wrapper.m: don't try to eject unless there is
authorJon Lech Johansen <jlj@videolan.org>
Sun, 19 May 2002 19:16:40 +0000 (19:16 +0000)
committerJon Lech Johansen <jlj@videolan.org>
Sun, 19 May 2002 19:16:40 +0000 (19:16 +0000)
    a disc to eject.

plugins/macosx/intf_vlc_wrapper.m

index 17eb6434a3e9bb90252e321f64311b6ba1e82b22..def5d83a9da504e32f2a75b9a5cdddaf6ddf278e 100644 (file)
@@ -2,7 +2,7 @@
  * intf_vlc_wrapper.c: MacOS X plugin for vlc
  *****************************************************************************
  * Copyright (C) 2001 VideoLAN
- * $Id: intf_vlc_wrapper.m,v 1.4 2002/05/19 17:27:39 massiot Exp $
+ * $Id: intf_vlc_wrapper.m,v 1.5 2002/05/19 19:16:40 jlj Exp $
  *
  * Authors: Florian G. Pflug <fgp@phlo.org>
  *          Jon Lech Johansen <jon-vl@nanocrew.net>
@@ -286,8 +286,11 @@ static Intf_VLCWrapper *o_intf = nil;
         o_devices = GetEjectableMediaOfClass(kIOCDMediaClass);
     }
 
-    psz_device = [[o_devices objectAtIndex:0] cString];
-    intf_Eject( psz_device );
+    if ( o_devices != nil && [o_devices count] )
+    { 
+        psz_device = [[o_devices objectAtIndex:0] cString];
+        intf_Eject( psz_device );
+    }
 }
 
 /* playback info */