Hi Dave

I dont know whether the problem is with pgAdmin or not.
But I have a fix for this.

File name:-  src/frm/frmQuery.cpp

void frmQuery::OnChangeConnection(wxCommandEvent &ev)
{
    unsigned int sel=cbConnection->GetCurrentSelection();

+  if(!IsVisible())
+       return;

    if (sel == cbConnection->GetCount()-1)
    {
        // new Connection
        dlgSelectConnection dlg(this, mainForm);
        int rc=dlg.Go(conn, cbConnection);
----------------------------------------------------------------------------
After closing the query tool, this event is called.
So I am checking whether the window is destroyed already or not.
Is it the right fix?
I am testing in different machines(sparc/x-86) and report you soon.
Please comment on this?

Thanks
Dhanaraj




Dave Page wrote:

Dhanaraj M wrote:

Sorry for the wrong work around.
But it crahes in this step...
if (s->GetConnected() && s->GetConnection()->GetHost() == conn->GetHost() && s->GetConnection()->GetPort() == conn->GetPort())^M I think 'conn' is destroyed already... or some other problem.

Any idea??


Sorry - just building wx now....

Try testing conn at the beginning of the if statement:

if (conn && s->GetConnected() && s->GetConnection()->GetHost() ==

I'm still not sure how you're getting into that code when you close the form though...

Regards, Dave.

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org



---------------------------(end of broadcast)---------------------------
TIP 5: don't forget to increase your free space map settings

Reply via email to