Diffstat (limited to 'noncore/apps/opie-console/procctl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/apps/opie-console/procctl.cpp | 5 |
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 | |||
@@ -44,17 +44,20 @@ void ProcCtl::remove( pid_t pi ) { | |||
44 | return; | 44 | return; |
45 | } | 45 | } |
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; |
59 | } | 62 | } |
60 | 63 | ||