summaryrefslogtreecommitdiff
path: root/noncore
Side-by-side diff
Diffstat (limited to 'noncore') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/applets/memoryapplet/swapfile.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/noncore/applets/memoryapplet/swapfile.cpp b/noncore/applets/memoryapplet/swapfile.cpp
index 4609c13..50c173b 100644
--- a/noncore/applets/memoryapplet/swapfile.cpp
+++ b/noncore/applets/memoryapplet/swapfile.cpp
@@ -2,4 +2,5 @@
** Copyright (C) 2000 Trolltech AS. All rights reserved.
+** Copyright (C) 2002-2005 the Opie Team <opie-devel@handhelds.org>
**
-** This file is part of Qtopia Environment.
+** This file is part of Opie Environment.
**
@@ -58,2 +59,7 @@ Swapfile::Swapfile( QWidget *parent, const char *name, WFlags f )
{
+ if ( !QFile::exists( "/proc/swaps" ) )
+ {
+ QLabel *text = new QLabel( tr( "Swap disabled in kernel" ), this );
+ return;
+ }
// are we running as root?