projects
/
supertux.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7baf00e
)
Check that the userdata pointer is not null, which happens when a user creates a...
author
Ingo Ruhnke
<grumbel@gmx.de>
Fri, 6 Mar 2009 01:56:24 +0000
(
01:56
+0000)
committer
Ingo Ruhnke
<grumbel@gmx.de>
Fri, 6 Mar 2009 01:56:24 +0000
(
01:56
+0000)
SVN-Revision: 5845
tools/miniswig/create_wrapper.cpp
patch
|
blob
|
history
diff --git
a/tools/miniswig/create_wrapper.cpp
b/tools/miniswig/create_wrapper.cpp
index
a316631
..
29f35b2
100644
(file)
--- a/
tools/miniswig/create_wrapper.cpp
+++ b/
tools/miniswig/create_wrapper.cpp
@@
-304,7
+304,7
@@
WrapperCreator::create_function_wrapper(Class* _class, Function* function)
// retrieve pointer to class instance
if(_class != 0 && function->type != Function::CONSTRUCTOR) {
out << ind << "SQUserPointer data;\n";
// retrieve pointer to class instance
if(_class != 0 && function->type != Function::CONSTRUCTOR) {
out << ind << "SQUserPointer data;\n";
- out << ind << "if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))) {\n";
+ out << ind << "if(SQ_FAILED(sq_getinstanceup(vm, 1, &data, 0))
|| !data
) {\n";
out << ind << ind << "sq_throwerror(vm, _SC(\"'" << function->name << "' called without instance\"));\n";
out << ind << ind << "return SQ_ERROR;\n";
out << ind << "}\n";
out << ind << ind << "sq_throwerror(vm, _SC(\"'" << function->name << "' called without instance\"));\n";
out << ind << ind << "return SQ_ERROR;\n";
out << ind << "}\n";