Add some assertions to ensure NULL pointer is not used

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13910 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2012-11-19 19:42:17 +00:00
commit 288e45cb15

View file

@ -2328,6 +2328,7 @@ public:
// Get the C# variable type - obtained differently depending on whether a setter is required.
String *variable_type = return_type;
if (setter_flag) {
assert(last_parm);
p = last_parm; // (last parameter is the only parameter for properties)
SwigType *pt = Getattr(p, "type");
if ((tm = Getattr(p, "tmap:cstype"))) {
@ -2350,6 +2351,7 @@ public:
if (setter_flag) {
// Setter method
assert(last_parm);
p = last_parm; // (last parameter is the only parameter for properties)
SwigType *pt = Getattr(p, "type");
if ((tm = Getattr(p, "tmap:csvarin"))) {