Assert selected_partition_ptr is valid before use (#750168)
Further ensure that a bug doesn't get introduced with the use of selected_partition_ptr, by asserting that it points to a current partition object in the vector of display partitions. After deliberately breaking the code so that selected_partition_ptr points to some other partition object, trying to display the Information dialog causes this crash: ====================== libparted : 2.4 ====================== ** ERROR:Win_GParted.cc:989:void GParted::Win_GParted::set_valid_operations(): assertion failed: (valid_display_partition_ptr( selected_partition_ptr )) Aborted (core dumped) At this point in the code: 973 void Win_GParted::set_valid_operations() 974 { ... 986 // No partition selected ... 987 if ( ! selected_partition_ptr ) 988 return ; >> 989 g_assert( valid_display_partition_ptr( selected_partition_ptr ) ); // Bug: Not pointing at a valid display partition object Bug 750168 - Reduce the amount of copying of partition objects
parent
5e027d69
Please register or sign in to comment