Corrected handling of pasteboard data of type NSFilenamesPboardType.

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@17015 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
FredKiefer 2003-06-24 22:57:12 +00:00
parent 0ede427d8b
commit fe2421f135
3 changed files with 12 additions and 3 deletions

View file

@ -400,9 +400,12 @@ repd_for_rep(NSArray *_reps, NSImageRep *rep)
[self addRepresentations: reps];
else
{
NSString* file = [pasteboard propertyListForType: NSFilenamesPboardType];
NSArray *array = [pasteboard propertyListForType: NSFilenamesPboardType];
NSString* file;
if (file != nil || ![self _loadFromFile: file])
if ((array == nil) || ([array count] == 0) ||
(file = [array objectAtIndex: 0]) == nil ||
![self _loadFromFile: file])
{
RELEASE(self);
return nil;