In my spare time, I checked for the solution for this segfault.
Please find the attached the patch. I don't know - how could I miss to call the gqbGridJoinTable's removeJoins function from OnMenuTableDelete function. :( I have called the same function from OnKeyDown for keyCode is equal to WXK_DELETE.
Sorry for introducing this kind of bug. I am really feeling bad for this.