[Kde-bindings] playground/bindings/kimono
Arno Rehn
kde at arnorehn.de
Sun Mar 25 12:54:02 UTC 2007
SVN commit 646347 by arnorehn:
* If a object is destroyed, don't call any methods on it anymore (fixes
the crash of e.g. the pingpong example)
CCMAIL: kde-bindings at kde.org
M +5 -0 ChangeLog
M +1 -1 core/QObject.cs
M +4 -1 qyoto.cpp
--- trunk/playground/bindings/kimono/ChangeLog #646346:646347
@@ -1,3 +1,8 @@
+2007-03-25 Arno Rehn <arno at arnorehn.de>
+
+ * If a object is destroyed, don't call any methods on it anymore (fixes
+ the crash of e.g. the pingpong example)
+
2007-03-24 Richard Dale <rdale at foton.es>
* The 'IsSmokeClass()' test now uses the Smoke class data cache
--- trunk/playground/bindings/kimono/core/QObject.cs #646346:646347
@@ -22,7 +22,7 @@
}
[SmokeMethod("metaObject", "()", "")]
public virtual QMetaObject MetaObject() {
- if (Qyoto.IsSmokeClass(GetType())) {
+ if (SmokeMarshallers.IsSmokeClass(GetType())) {
return ((QObject) interceptor).MetaObject();
} else {
return Qyoto.GetMetaObject(this);
--- trunk/playground/bindings/kimono/qyoto.cpp #646346:646347
@@ -530,7 +530,7 @@
_cur(-1), _smoke(smoke), _method(method), _target(target), _o(0), _sp(sp), _items(items), _called(false)
{
if (!isConstructor() && !isStatic()) {
- _o = value_obj_info(_target);
+ _o = value_obj_info(_target);
if (_o != 0 && _o->ptr != 0) {
if ( isDestructor()
&& (!_o->allocated || IsContainedInstance(_o) || application_terminated) )
@@ -538,6 +538,9 @@
_called = true;
_o->allocated = false;
}
+ } else if (_o == 0 || _o->ptr == 0) {
+ // not a constructor, not static, pointer invalid -> object already destroyed
+ _called = true;
}
}
More information about the Kde-bindings
mailing list