Applied teh second fix for FTPSERVER-476
authorEmmanuel Lécharny <elecharny@symas.com>
Wed, 2 Nov 2016 20:17:59 +0000 (21:17 +0100)
committerEmmanuel Lécharny <elecharny@symas.com>
Wed, 2 Nov 2016 20:17:59 +0000 (21:17 +0100)
core/src/main/java/org/apache/ftpserver/impl/IODataConnectionFactory.java

index 19230af..e9d22df 100644 (file)
@@ -77,8 +77,8 @@ public class IODataConnectionFactory implements ServerDataConnectionFactory {
             final FtpIoSession session) {
         this.session = session;
         this.serverContext = serverContext;
-        if ((session != null) && session.getListener().getDataConnectionConfiguration()
-                .isImplicitSsl()) {
+        if ((session != null) && (session.getListener() != null) && 
+            session.getListener().getDataConnectionConfiguration().isImplicitSsl()) {
             secure = true;
         }
     }