From e398b3cd6490c60035da843b37e555e89367b644 Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Thu, 14 May 2015 08:27:07 +0200 Subject: fix a crash after "insufficient space" error create_display_box gets called twice. The first time, only the $kind parameter has a value, the second time all the parameters (including $button) have values. On the first time through the partitioning step, the second call to create_display_box sets the selected_for_resize flag for my NTFS partition. When returning to the partitioning step, this flag is still set, so the first call to create_display_box executes the block of code that ends with $button->signal_connect('focus-in-event' => sub { ... }); even though it doesn't have a value for $button. (Martin Whitaker, mga#15919) --- perl-install/fs/partitioning_wizard.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'perl-install/fs/partitioning_wizard.pm') diff --git a/perl-install/fs/partitioning_wizard.pm b/perl-install/fs/partitioning_wizard.pm index 4a9078966..f3b997377 100644 --- a/perl-install/fs/partitioning_wizard.pm +++ b/perl-install/fs/partitioning_wizard.pm @@ -335,7 +335,7 @@ sub create_display_box { my @colorized_fs_types = qw(ext2 ext3 ext4 xfs swap vfat ntfs ntfs-3g); my $part_widget = Gtk3::EventBox->new; $entry->{width} = int($entry->{size} * $initial_ratio) + $minwidth; - if ($entry->{selected_for_resize}) { + if ($resize && $entry->{selected_for_resize}) { my $ratio; my $update_ratio = sub { $ratio = $entry->{width} / $entry->{size} }; $update_ratio->(); -- cgit v1.2.1