diff --git a/src/net/fusejna/FuseFilesystem.java b/src/net/fusejna/FuseFilesystem.java
index 88fe54b..09e9313 100644
--- a/src/net/fusejna/FuseFilesystem.java
+++ b/src/net/fusejna/FuseFilesystem.java
@@ -163,6 +163,8 @@ public abstract class FuseFilesystem
@FuseMethod
final int _listxattr(final String path, final Pointer buffer, final TypeSize size)
{
+ if (buffer == null)
+ { return 0; };
final long sizeValue = size.longValue();
final XattrListFiller filler = new XattrListFiller(buffer.getByteBuffer(0, sizeValue), sizeValue);
return listxattr(path, filler);
Simple patch