diff --git a/ChangeLog b/ChangeLog
index 81105fcb790135e3bcb41c46a3c519fd7a197300..84b8295affb694aa55fe6e80e98bdbd5a77b1ad1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
+2014-01-25 Chris Allegretta <chrisa@asty.org>
+	* src/winio.c (set_modified) - Check for a filename before we bother trying to lock
+
 2014-01-01 Chris Allegretta <chrisa@asty.org>
 	* doc/texinfo/nano.texi - Change '@sp4' since makeinfo 5.1 hates the
 	  lack of spacing.  Fixes Savannah bug 40103 repored by flapane@Savannah.
diff --git a/src/winio.c b/src/winio.c
index b032c050a51fad25d45eceb8aa0d32bb9f3e9211..46f62ff6d1d5aaccd645eaf5c8a0c6a10c686f7b 100644
--- a/src/winio.c
+++ b/src/winio.c
@@ -2260,7 +2260,9 @@ void set_modified(void)
 	titlebar(NULL);
 #ifndef NANO_TINY
 	if (ISSET(LOCKING)) {
-	    if (openfile->lock_filename == NULL) {
+	    if (!strcmp(openfile->filename, ""))
+		return;
+	    else if (openfile->lock_filename == NULL) {
                 /* Translators: Try to keep this at most 80 characters. */
                 statusbar(_("Warning: Modifying a file which is not locked, check directory permission?"));
 	    } else {