Package: gparted
Version: 0.3.3-5

I have the same error on every refresh of devices list, for example
from the GParted menu (Ctrl+R).

Possible patch is attached.

-- 
wbr
  Denis Sirotkin
ôÏÌØËÏ × gparted-0.3.3: debian
diff -ur gparted-0.3.3.orig/src/Win_GParted.cc gparted-0.3.3/src/Win_GParted.cc
--- gparted-0.3.3.orig/src/Win_GParted.cc	2006-12-01 18:14:23.000000000 +0500
+++ gparted-0.3.3/src/Win_GParted.cc	2007-11-04 11:46:32.000000000 +0500
@@ -916,8 +916,13 @@
 
 void Win_GParted::combo_devices_changed()
 {
+	unsigned int old_current_device = current_device;
 	//set new current device
 	current_device = combo_devices .get_active_row_number() ;
+	if ( current_device == (unsigned int) -1 )
+		current_device = old_current_device;
+	if ( current_device >= devices .size() )
+		current_device = 0 ;
 	set_title( String::ucompose( _("%1 - GParted"), devices[ current_device ] .get_path() ) );
 	
 	//refresh label_device_info

Reply via email to