summaryrefslogtreecommitdiff
path: root/noncore/apps/opie-console/procctl.cpp
Side-by-side diff
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
@@ -49,7 +49,10 @@ void ProcCtl::remove( pid_t pi ) {
while (con ) {
/* remove it */
if ( pi == con->pid ) {
- forw->prev = con->prev;
+ if (forw)
+ forw->prev = con->prev;
+ else
+ forw = con->prev;
delete con;
return;
}