another round...  ported to __SC__
diff --git a/Mac/Modules/win/Winmodule.c b/Mac/Modules/win/Winmodule.c
index 3f60d37..181cf77 100644
--- a/Mac/Modules/win/Winmodule.c
+++ b/Mac/Modules/win/Winmodule.c
@@ -36,12 +36,10 @@
 
 #define resNotFound -192 /* Can't include <Errors.h> because of Python's "errors.h" */
 
-#ifdef __MWERKS__
+#ifdef HAVE_UNIVERSAL_HEADERS
 #define WindowPeek WindowPtr
 #endif
 
-extern PyObject *WinObj_WhichWindow(WindowPtr w); /* Forward */
-
 static PyObject *Win_Error;
 
 /* ----------------------- Object type Window ----------------------- */
@@ -56,7 +54,7 @@
 } WindowObject;
 
 PyObject *WinObj_New(itself)
-	const WindowPtr itself;
+	WindowPtr itself;
 {
 	WindowObject *it;
 	if (itself == NULL) return PyMac_Error(resNotFound);
@@ -844,7 +842,10 @@
 	
 	/* XXX What if we find a stdwin window or a window belonging
 	       to some other package? */
-	it = (PyObject *) GetWRefCon(w);
+	if (w == NULL)
+		it = NULL;
+	else
+		it = (PyObject *) GetWRefCon(w);
 	if (it == NULL || ((WindowObject *)it)->ob_itself != w)
 		it = Py_None;
 	Py_INCREF(it);