I found a crash.
authordpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Mon, 1 Jun 2009 13:44:51 +0000 (13:44 +0000)
committerdpage <dpage@a7884b65-44f6-0310-8a51-81a127f17b15>
Mon, 1 Jun 2009 13:44:51 +0000 (13:44 +0000)
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

index b4ed91706e4b6bd7fb70f8cb6e7c9a74460d2c77..89ab79f62b9ac711e9c857c3af55685ab3a9a986 100644 (file)
@@ -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() );