-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | noncore/applets/memoryapplet/swapfile.cpp | 8 |
2 files changed, 9 insertions, 2 deletions
@@ -4,5 +4,5 @@ New Features ------------ - * OpieStumbler: New application (skyhusker) + * OpieStumbler: Scans WiFi networks using the wireless extension scanning (skyhusker) Fixed Bugs @@ -16,4 +16,5 @@ * n.a. - Wellenreiter: relax WE version matching test a bit (mickeyl) * n.a. - scale BluezApplet appropriately (mickeyl) + * n.a. - memoryapplet: fix crash in memoryapplet on kernels without swap support (seneca cunningham) Internal 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 @@ -1,6 +1,7 @@ /********************************************************************** ** 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. ** ** This file may be distributed and/or modified under the terms of the @@ -57,4 +58,9 @@ Swapfile::Swapfile( QWidget *parent, const char *name, WFlags f ) : QWidget( parent, name, f ) { + if ( !QFile::exists( "/proc/swaps" ) ) + { + QLabel *text = new QLabel( tr( "Swap disabled in kernel" ), this ); + return; + } // are we running as root? isRoot = geteuid() == 0; |