[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

rpms/kdeutils/FC-3 kdeutils-3.3.1-ksim.patch, NONE, 1.1 kdeutils.spec, 1.29, 1.30



Author: than

Update of /cvs/dist/rpms/kdeutils/FC-3
In directory cvs.devel.redhat.com:/tmp/cvs-serv12685

Modified Files:
	kdeutils.spec 
Added Files:
	kdeutils-3.3.1-ksim.patch 
Log Message:
fix ksim crash #160922


kdeutils-3.3.1-ksim.patch:
 ksimview.cpp             |    3 ++-
 library/pluginmodule.cpp |    8 ++++++--
 monitors/cpu/ksimcpu.cpp |    3 ++-
 3 files changed, 10 insertions(+), 4 deletions(-)

--- NEW FILE kdeutils-3.3.1-ksim.patch ---
--- kdeutils-3.3.1/ksim/library/pluginmodule.cpp.tn	2005-07-14 15:40:02.000000000 +0200
+++ kdeutils-3.3.1/ksim/library/pluginmodule.cpp	2005-07-14 15:40:56.000000000 +0200
@@ -102,7 +102,10 @@
 
 KConfig *KSim::PluginPage::config() const
 {
-  return d->config;
+  if (d)
+    return d->config;
+  else
+    return 0;
 }
 
 class KSim::PluginView::Private
@@ -133,9 +136,10 @@
 
 KSim::PluginView::~PluginView()
 {
-  delete d->config;
   delete d->popupMenu;
+  delete d->config;
   delete d;
+  d = 0;
 }
 
 KConfig *KSim::PluginView::config() const
--- kdeutils-3.3.1/ksim/monitors/cpu/ksimcpu.cpp.tn	2005-07-14 15:24:11.000000000 +0200
+++ kdeutils-3.3.1/ksim/monitors/cpu/ksimcpu.cpp	2005-07-14 16:20:54.295796175 +0200
@@ -173,7 +173,8 @@
 //    kdDebug(2003) << "nice = " << cpuData.nice << endl;
 //    kdDebug(2003) << "sys = " << cpuData.sys << endl;
 //    kdDebug(2003) << "idle = " << cpuData.idle << endl;
-    
+    if (total==0) continue;
+
     if (!m_firstTime) {
       if (text.find("%T") != -1)
         cpuDiff = cpuData.sys + cpuData.user + cpuData.nice;
--- kdeutils-3.3.1/ksim/ksimview.cpp.tn	2005-07-14 15:38:58.000000000 +0200
+++ kdeutils-3.3.1/ksim/ksimview.cpp	2005-07-14 15:39:55.000000000 +0200
@@ -272,7 +272,8 @@
   for (plugin = pluginList.begin(); plugin != pluginList.end(); ++plugin) {
     if ((*plugin).configPage()) {
       (*plugin).configPage()->saveConfig();
-      (*plugin).configPage()->config()->sync();
+      KConfig *conf = (*plugin).configPage()->config(); 
+      if (conf) conf->sync(); 
     }
 
     if (!(*plugin).isDifferent() && (*plugin).isEnabled()) {


Index: kdeutils.spec
===================================================================
RCS file: /cvs/dist/rpms/kdeutils/FC-3/kdeutils.spec,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -r1.29 -r1.30
--- kdeutils.spec	27 Oct 2004 15:52:15 -0000	1.29
+++ kdeutils.spec	14 Jul 2005 14:37:11 -0000	1.30
@@ -6,7 +6,7 @@
 %define qt_version 3.3.3
 
 Version: 3.3.1
-Release: 2.1
+Release: 2.2
 Name: kdeutils
 Prefix: /usr
 Summary: K Desktop Environment - Utilities
@@ -21,6 +21,7 @@
 Patch2: kde-libtool.patch
 Patch3: kdeutils-3.3.0-misc.patch
 Patch4: kdeutils-3.3.1-kdf-locale.patch
+Patch5: kdeutils-3.3.1-ksim.patch
 
 Requires: kdelibs >= 6:%{version}
 Requires: kdebase >= 6:%{version}
@@ -306,6 +307,9 @@
 %{_includedir}/kde/*
 
 %changelog
+* Thu Jul 14 2005 Than Ngo <than redhat com> 6:3.3.1-2.2
+- fix ksim crash #160922
+
 * Wed Oct 27 2004 Than Ngo <than redhat com> 6:3.3.1-2.1
 - Fix translation issue bug #136437
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]