Index: lib/ftp.c
===================================================================
RCS file: /cvsroot/curl/curl/lib/ftp.c,v
retrieving revision 1.503
diff -u -r1.503 ftp.c
--- lib/ftp.c	9 Mar 2009 04:32:51 -0000	1.503
+++ lib/ftp.c	1 Apr 2009 03:53:05 -0000
@@ -3214,7 +3214,8 @@
         ftpc->prevpath=strdup("");
         free(path);
       }
-      infof(data, "Remembering we are in dir \"%s\"\n", ftpc->prevpath);
+      if(ftpc->prevpath)
+        infof(data, "Remembering we are in dir \"%s\"\n", ftpc->prevpath);
     }
     else {
       ftpc->prevpath = NULL; /* no path */


