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:
parent
0b0d5b1124
commit
288e45cb15
1 changed files with 2 additions and 0 deletions
|
|
@ -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"))) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue