From d6be9833ff3407299cd844467738f675f05b2cfc Mon Sep 17 00:00:00 2001 From: Bart Hakvoort Date: Mon, 22 Nov 2004 20:40:19 +0000 Subject: [PATCH] fixed crasher with unknown filesystems. * include/Utils.h: fixed crasher with unknown filesystems. --- ChangeLog | 4 ++++ include/Utils.h | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 54d417f0..7a3ad1a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2004-11-22 Bart Hakvoort + + * include/Utils.h: fixed crasher with unknown filesystems. + 2004-11-22 Bart Hakvoort * src/GParted_Core.cc: cosmetics diff --git a/include/Utils.h b/include/Utils.h index 844f45ab..d41c665d 100644 --- a/include/Utils.h +++ b/include/Utils.h @@ -104,9 +104,9 @@ inline FS Get_FS( const Glib::ustring & filesystem, const std::vector & FILE for ( t = 0 ; t < FILESYSTEMS .size( ) ; t++ ) if ( FILESYSTEMS[ t ] .filesystem == filesystem ) - break ; + return FILESYSTEMS[ t ] ; - return FILESYSTEMS[ t ] ; + return FILESYSTEMS .back( ) ; } inline Glib::ustring Get_Color( const Glib::ustring & filesystem )