Closed GoogleCodeExporter closed 9 years ago
It's crashing on the following line:
(*it)->mouseEntered(mouseEvent);
Where (*it) is supposed to be your mouse listener, but the problem is, it
isn't. In
your application you've allocated two MyMouseListener instances on the stack in
guichan_init(), which are automatically destroyed once this function exists.
Unfortunately, Guichan doesn't know about this, so it crashes while trying to
tell it
about the entered event later on.
You already have plenty of global pointers to stuff allocated on the heap, so
you
probably want your listeners among those too. However, note that anything you
'new'
should normally also be deleted with 'delete'. There are currently no
occurences of
'delete' in your application.
Original comment by b.lindeijer
on 14 Aug 2008 at 8:55
Whoops, i guess that'll teach me to get some sleep before thinking about
submitting a
bug report. Many thanks for the kind response, it was entirely my own fault.
as for the deleting, once i get this working i'm changing all pointers to boost
smart
pointers, but during programming the compiler errors one gets when using them,
especially in combination with other templates, tend to drive me crazy.
grts
Grasman
Original comment by gras...@zandbak.org
on 15 Aug 2008 at 7:06
Original comment by olof.nae...@gmail.com
on 15 Aug 2008 at 7:18
Original issue reported on code.google.com by
gras...@zandbak.org
on 13 Aug 2008 at 11:42Attachments: