solve possible seg. faults and directors #1080075

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6894 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Marcelo Matus 2004-12-16 10:40:01 +00:00
commit 544f24441e
7 changed files with 28 additions and 24 deletions

View file

@ -41,9 +41,11 @@ namespace Swig {
class DirectorTypeMismatchException : public Swig::DirectorException {
public:
DirectorTypeMismatchException(const char* msg="") {
swig_msg = "Swig director type mismatch: ";
swig_msg += msg;
PyErr_SetString(PyExc_TypeError, getMessage());
if (!PyErr_Occurred()) {
swig_msg = "Swig director type mismatch: ";
swig_msg += msg;
PyErr_SetString(PyExc_TypeError, getMessage());
}
}
};