Bug fix: check whether call succeeded *after* the call.
diff --git a/Modules/stropmodule.c b/Modules/stropmodule.c
index 4a10b7c..6686abf 100644
--- a/Modules/stropmodule.c
+++ b/Modules/stropmodule.c
@@ -382,8 +382,8 @@
 		if (isspace(c))
 			buf[n++] = c;
 	}
+	s = newsizedstringobject(buf, n);
 	if (s) {
-		s = newsizedstringobject(buf, n);
 		dictinsert(d, "whitespace", s);
 		DECREF(s);
 	}