diff src/if_py_both.h @ 4754:be1e4acb30ca v7.3.1124

updated for version 7.3.1124 Problem: Python: Crash on MS-Windows when os.fchdir() is not available. Solution: Check for _chdir to be NULL. (Ken Takata)
author Bram Moolenaar <bram@vim.org>
date Wed, 05 Jun 2013 20:34:15 +0200
parents 3534e9b4fa42
children ff3935926449
line wrap: on
line diff
--- a/src/if_py_both.h
+++ b/src/if_py_both.h
@@ -718,6 +718,8 @@ VimStrwidth(PyObject *self UNUSED, PyObj
     PyObject	*todecref;
     char_u	*new_dir;
 
+    if (_chdir == NULL)
+	return NULL;
     if (!(r = PyObject_Call(_chdir, args, kwargs)))
 	return NULL;