[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bindings
Subject:    [Kde-bindings] playground/bindings/kimono
From:       Arno Rehn <kde () arnorehn ! de>
Date:       2007-03-25 12:54:02
Message-ID: 1174827242.330331.16507.nullmailer () svn ! kde ! org
[Download RAW message or body]

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@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@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@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;
 			}
 		}
 	
_______________________________________________
Kde-bindings mailing list
Kde-bindings@kde.org
https://mail.kde.org/mailman/listinfo/kde-bindings


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic