From bad9352db6617835f12292f262952def1207dcb1 Mon Sep 17 00:00:00 2001 From: Florent Villard Date: Sat, 15 Mar 2003 15:26:37 +0000 Subject: Fix fatal error in editable window when adding a new entry --- perl-install/standalone/drakperm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'perl-install/standalone/drakperm') diff --git a/perl-install/standalone/drakperm b/perl-install/standalone/drakperm index df811d232..6cd2202a3 100755 --- a/perl-install/standalone/drakperm +++ b/perl-install/standalone/drakperm @@ -242,7 +242,7 @@ sub row_setting_dialog { my $sticky = new Gtk2::CheckButton(N("sticky-bit")); my $suid = new Gtk2::CheckButton(N("Set-UID")); my $gid = new Gtk2::CheckButton(N("Set-GID")); - my $rght = $treeModel->_get($iter, 3); + my $rght = $treeModel->_get($iter, 3) if $iter; my $s = length($rght) == 4 ? substr($rght,0,1) : 0; my $user = $s ? substr($rght,1,1) : substr($rght,0,1); my $group = $s ? substr($rght,2,1) : substr($rght,1,1); @@ -279,17 +279,17 @@ sub row_setting_dialog { $s_right{write} and $gid->set_active(1); $s_right{read} and $suid->set_active(1); - $file->set_text($treeModel->_get($iter, 0)); + $file->set_text($treeModel->_get($iter, 0)) if $iter; $users->set_popdown_strings(&get_user_or_group('users')); - $users->entry->set_text($treeModel->_get($iter, 1)); + $users->entry->set_text($treeModel->_get($iter, 1)) if $iter; $users->entry->set_editable(0); $groups->set_popdown_strings(&get_user_or_group); - $groups->entry->set_text($treeModel->_get($iter, 2)); + $groups->entry->set_text($treeModel->_get($iter, 2)) if $iter; $groups->entry->set_editable(0); - if ($treeModel->_get($iter, 1) eq 'current') { + if ($iter && $treeModel->_get($iter, 1) eq 'current') { $usr_check->set_active(1); $groups->set_sensitive(0); $users->set_sensitive(0); -- cgit v1.2.1