summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1993-11-01 16:26:16 (GMT)
committerGuido van Rossum <guido@python.org>1993-11-01 16:26:16 (GMT)
commit82d410e73301f22a2e48c884d826eb772b1e89ef (patch)
tree6745c8bac0591725c89497cb1640ef71866ebaff /Objects
parentc70b61fe6d729ddebc536ec273d97f57fa47cd86 (diff)
downloadcpython-82d410e73301f22a2e48c884d826eb772b1e89ef.zip
cpython-82d410e73301f22a2e48c884d826eb772b1e89ef.tar.gz
cpython-82d410e73301f22a2e48c884d826eb772b1e89ef.tar.bz2
* fileobject.c (softspace): fix bug if called with NULL file.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/fileobject.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 5099f3f..7ed4fcd 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -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;
}