summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/procctl.cpp
Unidiff
Diffstat (limited to 'noncore/apps/opie-console/procctl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/opie-console/procctl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/noncore/apps/opie-console/procctl.cpp b/noncore/apps/opie-console/procctl.cpp
index a44529b..5239e26 100644
--- a/noncore/apps/opie-console/procctl.cpp
+++ b/noncore/apps/opie-console/procctl.cpp
@@ -46,13 +46,16 @@ void ProcCtl::remove( pid_t pi ) {
46 46
47 con = m_last; 47 con = m_last;
48 ProcContainer* forw = 0l; 48 ProcContainer* forw = 0l;
49 while (con ) { 49 while (con ) {
50 /* remove it */ 50 /* remove it */
51 if ( pi == con->pid ) { 51 if ( pi == con->pid ) {
52 forw->prev = con->prev; 52 if (forw)
53 forw->prev = con->prev;
54 else
55 forw = con->prev;
53 delete con; 56 delete con;
54 return; 57 return;
55 } 58 }
56 59
57 forw = con; 60 forw = con;
58 con = con->prev; 61 con = con->prev;