diff --git a/pgadmin/frm/frmDatabaseDesigner.cpp b/pgadmin/frm/frmDatabaseDesigner.cpp index a66f065..8fc42e9 100644 --- a/pgadmin/frm/frmDatabaseDesigner.cpp +++ b/pgadmin/frm/frmDatabaseDesigner.cpp @@ -823,11 +823,8 @@ void frmDatabaseDesigner::OnChangeConnection(wxCommandEvent &event) pgConn *newconn = dlg.CreateConn(applicationname, createdNewConn); if (newconn && createdNewConn) { -#if wxCHECK_VERSION(2, 9, 0) - cbConnection->Insert(newconn->GetName(), CreateBitmap(GetServerColour(newconn)), sel, (wxClientData *)newconn); -#else - cbConnection->Insert(newconn->GetName(), CreateBitmap(GetServerColour(newconn)), sel, (void *)newconn); -#endif + cbConnection->Insert(newconn->GetName(), CreateBitmap(GetServerColour(newconn)), sel); + cbConnection->SetClientData(sel, (void *)newconn); cbConnection->SetSelection(sel); OnChangeConnection(event); } diff --git a/pgadmin/schema/pgIndex.cpp b/pgadmin/schema/pgIndex.cpp index 7404ed2..e34975d 100644 --- a/pgadmin/schema/pgIndex.cpp +++ b/pgadmin/schema/pgIndex.cpp @@ -532,7 +532,13 @@ pgObject *pgIndexBaseFactory::CreateObjects(pgCollection *coll, ctlTree *browser { while (!indexes->Eof()) { - switch ( (wxChar)indexes->GetVal(wxT("contype"))[0U]) + wxString strVal = indexes->GetVal(wxT("contype")); + if(strVal.IsEmpty()) + { + indexes->MoveNext(); + continue; + } + switch ((wxChar)strVal[0U]) { case 0: index = new pgIndex(collection->GetTable(), indexes->GetVal(wxT("idxname")));