[A5.1 SVN] crash when ending application
Since lately, my game crashes during exit. I've tracked down this to
static void shutdown_system_driver(void)
in system.c, where a destructor call for user_exe_path is called, on already destroyed data. It helps to move the new lines up, like this:
3 if (
4 ALLEGRO_CONFIG *
5 if (
active_sysdrv->user_exe_path) <<-- new
must be called before shutdown_system()
7 if (
10 /* active_sysdrv is not accessible here so we copied it */
13 while (!
Makes sense, but it's not destroying it twice, it's trying to access user_exe_path through a freed pointer.
It doesn't look like the user_exe_path has anything to do with with current driver. Can you explain why your fix is necessary?
My understanding was that active_sysdrv was being freed.
Edit: that comment seems to be erroneuous now.
Thread #608012. Printed from Allegro.cc
Thanks, I committed it to SVN. (Was also me who had added those 2 lines to the wrong place... just wanted to get my speedhack entry working under Windows and wasn't careful enough )