diff --git a/pgadmin/dlg/dlgSearchObject.cpp b/pgadmin/dlg/dlgSearchObject.cpp index 43be304..6af9294 100644 --- a/pgadmin/dlg/dlgSearchObject.cpp +++ b/pgadmin/dlg/dlgSearchObject.cpp @@ -454,9 +454,12 @@ void dlgSearchObject::OnSearch(wxCommandEvent &ev) delete set; } - lcResults->SetColumnWidth(0, wxLIST_AUTOSIZE); - lcResults->SetColumnWidth(1, wxLIST_AUTOSIZE); - lcResults->SetColumnWidth(2, wxLIST_AUTOSIZE); + if(lcResults->GetItemCount() > 0) + { + lcResults->SetColumnWidth(0, wxLIST_AUTOSIZE); + lcResults->SetColumnWidth(1, wxLIST_AUTOSIZE); + lcResults->SetColumnWidth(2, wxLIST_AUTOSIZE); + } } wxString dlgSearchObject::TranslatePath(wxString &path)