]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
* fileobject.c (softspace): fix bug if called with NULL file.
authorGuido van Rossum <guido@python.org>
Mon, 1 Nov 1993 16:26:16 +0000 (16:26 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 1 Nov 1993 16:26:16 +0000 (16:26 +0000)
Objects/fileobject.c

index 5099f3f694ef57d262fe1346aaa06ea6b6b18463..7ed4fcd08288b5c0a22d885171ba094604d07da2 100644 (file)
@@ -630,7 +630,7 @@ softspace(f, newflag)
        if (f == NULL) {
                /* Do nothing */
        }
-       if (is_fileobject(f)) {
+       else if (is_fileobject(f)) {
                oldflag = ((fileobject *)f)->f_softspace;
                ((fileobject *)f)->f_softspace = newflag;
        }