Commits

Anonymous committed a72460d

Fix error return in win32gui.GetClassName

Comments (0)

Files changed (1)

win32/src/win32gui.i

 	// dont bother with lock - no callback possible.
 	int nchars = GetClassName(hwnd, buf, sizeof buf/sizeof buf[0]);
 	if (nchars==0)
-		PyWin_SetAPIError("GetClassName");
+		return PyWin_SetAPIError("GetClassName");
 	return PyWinObject_FromTCHAR(buf, nchars);
 }
 %}