kdelibs/kdelibs-3.0.4-ksyscoca.patch

30 lines
760 B
Diff

--- kdelibs-3.0.4/kdecore/ksycoca.cpp.ksyscoca 2002-09-09 20:25:56.000000000 -0400
+++ kdelibs-3.0.4/kdecore/ksycoca.cpp 2002-10-10 12:16:39.000000000 -0400
@@ -149,9 +149,15 @@
}
static void delete_ksycoca_self() {
- delete KSycoca::_self;
+ if (KSycoca::_checkSelf())
+ delete KSycoca::_self;
+
}
+bool KSycoca::_checkSelf() {
+ return (_self ? true : false);
+}
+
KSycoca * KSycoca::self()
{
if (!_self) {
--- kdelibs-3.0.4/kdecore/ksycoca.h.ksyscoca 2002-09-09 20:25:56.000000000 -0400
+++ kdelibs-3.0.4/kdecore/ksycoca.h 2002-10-10 11:54:28.000000000 -0400
@@ -63,6 +63,7 @@
* Get or create the only instance of KSycoca (read-only)
*/
static KSycoca *self();
+ static bool _checkSelf();
virtual ~KSycoca();