diff --git a/include/GParted_Core.h b/include/GParted_Core.h index e3a923b0..94d204b5 100644 --- a/include/GParted_Core.h +++ b/include/GParted_Core.h @@ -65,7 +65,7 @@ public: Glib::ustring get_libparted_version() ; Glib::ustring get_thread_status_message() ; - static FileSystem * get_filesystem_object( FSType filesystem ); + static FileSystem * get_filesystem_object( FSType fstype ); static bool supported_filesystem( FSType fstype ); static FS_Limits get_filesystem_limits( FSType fstype, const Partition & partition ); static bool filesystem_resize_disallowed( const Partition & partition ) ; diff --git a/src/GParted_Core.cc b/src/GParted_Core.cc index 4b9d6854..8b33eed3 100644 --- a/src/GParted_Core.cc +++ b/src/GParted_Core.cc @@ -3786,12 +3786,13 @@ bool GParted_Core::update_dmraid_entry( const Partition & partition, OperationDe return success; } -FileSystem * GParted_Core::get_filesystem_object( FSType filesystem ) +FileSystem * GParted_Core::get_filesystem_object( FSType fstype ) { - if ( FILESYSTEM_MAP .count( filesystem ) ) - return FILESYSTEM_MAP[ filesystem ] ; + std::map::const_iterator fs_iter = FILESYSTEM_MAP.find( fstype ); + if ( fs_iter == FILESYSTEM_MAP.end() ) + return NULL; else - return NULL ; + return fs_iter->second; } // Return true for file systems with an implementation class, false otherwise