From http://www.jwz.org/xscreensaver/xscreensaver-5.35.tar.gz
[xscreensaver] / OSX / osxgrabscreen.m
index 8de3a09cae63cd646fcb5d6f324444bc5d6b4c43..c7f4f15b686902b3185744abf1f3f06eef74c001 100644 (file)
@@ -24,7 +24,7 @@
 #else
 # import "SaverRunner.h"
 #endif
-#import "jwxyz.h"
+#import "jwxyz-cocoa.h"
 #import "grabscreen.h"
 #import "colorbars.h"
 #import "resources.h"
@@ -424,6 +424,8 @@ osx_load_image_file (Screen *screen, Window xwindow, Drawable drawable,
 {
 # ifndef USE_IPHONE
 
+  if (!filename || !*filename) return False;
+
   NSImage *img = [[NSImage alloc] initWithContentsOfFile:
                                     [NSString stringWithCString:filename
                                               encoding:NSUTF8StringEncoding]];