From 97a37a103ccfb266e3a7a3a9eef37391fd9a163a Mon Sep 17 00:00:00 2001 From: dpage Date: Mon, 1 Jun 2009 13:44:51 +0000 Subject: [PATCH] I found a crash. Steps to reproduce it. 1. Select property dialog of any schema 2. Go to Priviledges tab 3. Make sure no User/Group is selected in the ctlListView. 4. Press Remove button [Ashesh Vashi] git-svn-id: svn://svn.pgadmin.org/trunk/pgadmin3@7890 a7884b65-44f6-0310-8a51-81a127f17b15 --- pgadmin/ctl/ctlSecurityPanel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pgadmin/ctl/ctlSecurityPanel.cpp b/pgadmin/ctl/ctlSecurityPanel.cpp index b4ed91706..89ab79f62 100644 --- a/pgadmin/ctl/ctlSecurityPanel.cpp +++ b/pgadmin/ctl/ctlSecurityPanel.cpp @@ -292,6 +292,9 @@ void ctlSecurityPanel::CheckGrantOpt(int id) void ctlSecurityPanel::OnDelPriv(wxCommandEvent &ev) { + if (lbPrivileges->GetFirstSelected() == -1) + return; + lbPrivileges->DeleteCurrentItem(); wxCommandEvent event( EVT_SECURITYPANEL_CHANGE, GetId() ); -- 2.39.5