]> asedeno.scripts.mit.edu Git - PuTTY.git/blobdiff - raw.c
Document /DNO_SECURITY compile option.
[PuTTY.git] / raw.c
diff --git a/raw.c b/raw.c
index f5b93f79a06b4f3ae787c76f4172243798832494..86fd5315cd282ddb4644e4b80668607c5a6d8331 100644 (file)
--- a/raw.c
+++ b/raw.c
@@ -23,8 +23,10 @@ static void c_write(char *buf, int len)
 static int raw_closing(Plug plug, char *error_msg, int error_code,
                       int calling_back)
 {
-    sk_close(s);
-    s = NULL;
+    if (s) {
+        sk_close(s);
+        s = NULL;
+    }
     if (error_msg) {
        /* A socket error has occurred. */
        connection_fatal(error_msg);