Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / qt / 2009-09

freeing hooks -> could caused sigsevs.

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Den Jean

Hi Zeljko,

I forgot to mention that I found
and fixed a bug (use of invalid pointer)
in qobject_hook.h

I left printfs in the code, so that you can
activate them and find out how
it affected your existing code:

  virtual ~QObject_hook() {
    if (handle) {
      //printf("before calling potentially dangling pointer handle...\n");
      handle->removeEventFilter(this);
      //printf("after calling potentially dangling pointer handle.\n");
      handle->disconnect(this);
      handle = NULL;
    } //else printf("avoided dangling pointer problem\n");
  }

sorry for the bug :-)

Den Jean.