[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: KDE/kdebindings/ruby
From: Arno Rehn <kde () arnorehn ! de>
Date: 2010-01-31 13:31:30
Message-ID: 1264944690.881738.6285.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1082906 by arnorehn:
Never set KSharedPtr's 'allocated' field to true.
The bindings runtime would think it has created the object
and delete it when it's not in use anymore. Native C++ code trying
to access that pointer afterwards will consequently crash.
CCMAIL: kde-bindings@kde.org
M +3 -3 korundum/src/kdehandlers.cpp
M +1 -1 plasma/src/plasmahandlers.cpp
--- trunk/KDE/kdebindings/ruby/korundum/src/kdehandlers.cpp #1082905:1082906
@@ -96,7 +96,7 @@
o->smoke = m->smoke();
o->classId = m->smoke()->idClass("KService").index;
o->ptr = service;
- o->allocated = true;
+ o->allocated = false;
obj = set_obj_info("KDE::Service", o);
}
@@ -138,7 +138,7 @@
o->smoke = m->smoke();
o->classId = m->smoke()->idClass("KSharedConfig").index;
o->ptr = config;
- o->allocated = true;
+ o->allocated = false;
obj = set_obj_info("KDE::SharedConfig", o);
}
@@ -181,7 +181,7 @@
o->smoke = m->smoke();
o->classId = m->smoke()->idClass("KMimeType").index;
o->ptr = config;
- o->allocated = true;
+ o->allocated = false;
obj = set_obj_info("KDE::MimeType", o);
}
--- trunk/KDE/kdebindings/ruby/plasma/src/plasmahandlers.cpp #1082905:1082906
@@ -49,7 +49,7 @@
o->smoke = m->smoke();
o->classId = m->smoke()->idClass("Plasma::PackageStructure").index;
o->ptr = package;
- o->allocated = true;
+ o->allocated = false;
obj = set_obj_info("Plasma::PackageStructure", o);
}
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic