Maybe I'm just missing something, but here is what I have:
And yet:
Its crashing. Not instantly, but if I repeat creating/destroying it to test, it crashes. I dunno...
if (shuttle->name)
STRFREE(shuttle->name);
if (shuttle->takeoff_desc)
DISPOSE(shuttle->takeoff_desc);
if (shuttle->filename)
DISPOSE(shuttle->filename);
if (shuttle->approach_desc)
DISPOSE(shuttle->approach_desc);
if (shuttle->land_desc)
DISPOSE(shuttle->land_desc);
DISPOSE(shuttle);And yet:
Quote:
(gdb) frame 2
#2 0x08144e4c in destroy_shuttle (shuttle=0x8226358) at shuttle.c:917
917 DISPOSE(shuttle);
(gdb) print *shuttle
$5 = {
prev = 0x0,
next = 0x0,
next_in_room = 0x0,
prev_in_room = 0x0,
in_room = 0x0,
current = 0x0,
current_number = -1,
state = 1,
first_stop = 0x0,
last_stop = 0x0,
type = SHUTTLE_TURBOCAR,
filename = 0x0,
name = 0x8226240 "Test",
delay = 2,
current_delay = 2,
start_room = 2,
end_room = 2,
entrance = 2,
takeoff_desc = 0x0,
land_desc = 0x0,
approach_desc = 0x0
}
(gdb) frame 2
#2 0x08144e4c in destroy_shuttle (shuttle=0x8226358) at shuttle.c:917
917 DISPOSE(shuttle);
(gdb) print *shuttle
$5 = {
prev = 0x0,
next = 0x0,
next_in_room = 0x0,
prev_in_room = 0x0,
in_room = 0x0,
current = 0x0,
current_number = -1,
state = 1,
first_stop = 0x0,
last_stop = 0x0,
type = SHUTTLE_TURBOCAR,
filename = 0x0,
name = 0x8226240 "Test",
delay = 2,
current_delay = 2,
start_room = 2,
end_room = 2,
entrance = 2,
takeoff_desc = 0x0,
land_desc = 0x0,
approach_desc = 0x0
}
Its crashing. Not instantly, but if I repeat creating/destroying it to test, it crashes. I dunno...