Avoid dereferencing a NULL pointer in the constant_pointers testcase
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11520 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
46a258a748
commit
e2f2a7c128
1 changed files with 3 additions and 2 deletions
|
|
@ -121,7 +121,8 @@ int* const globalRet2() {return &GlobalInt;}
|
|||
|
||||
%{
|
||||
static int wxEVT_COMMAND_BUTTON_CLICKEDv;
|
||||
static int **wxEVT_COMMAND_BUTTON_CLICKEDp;
|
||||
static int *wxEVT_COMMAND_BUTTON_CLICKEDp;
|
||||
static int **wxEVT_COMMAND_BUTTON_CLICKEDpp = &wxEVT_COMMAND_BUTTON_CLICKEDp;
|
||||
#if defined(SWIGR)
|
||||
#undef lang1 /* conflicts with symbol in R internals */
|
||||
#endif
|
||||
|
|
@ -137,7 +138,7 @@ char *langs[] ={ lang1 };
|
|||
#define EWXWEXPORT_VAR
|
||||
|
||||
const int* wxEVENT_COMMAND_BUTTON_CLICKEDr = (int*) &wxEVT_COMMAND_BUTTON_CLICKEDv;
|
||||
const int* wxEVENT_COMMAND_BUTTON_CLICKEDp = (int*) *wxEVT_COMMAND_BUTTON_CLICKEDp;
|
||||
const int* wxEVENT_COMMAND_BUTTON_CLICKEDp = (int*) *wxEVT_COMMAND_BUTTON_CLICKEDpp;
|
||||
char **languages1 = &langs[0];
|
||||
char **languages2 = (char **)&langs[0];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue