mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-22 01:23:43 +02:00
reset reachable_pkg in the instantiation process and restore on inst_revert
Before, it was reset outside and not restored when instatiation failed. This caused fped to segfault.
This commit is contained in:
parent
5d76af2d7c
commit
59b90b3054
1
gui.c
1
gui.c
@ -328,7 +328,6 @@ void change_world(void)
|
||||
status_begin_reporting();
|
||||
before = inst_get_bbox();
|
||||
reachable_is_active = reachable_pkg && reachable_pkg == active_pkg;
|
||||
reachable_pkg = NULL;
|
||||
instantiate();
|
||||
if (reachable_is_active && reachable_pkg &&
|
||||
reachable_pkg != active_pkg) {
|
||||
|
5
inst.c
5
inst.c
@ -38,7 +38,7 @@ struct pkg *pkgs, *active_pkg, *curr_pkg;
|
||||
struct pkg *reachable_pkg = NULL;
|
||||
struct inst *frame_instantiating = NULL;
|
||||
|
||||
static struct pkg *prev_pkgs;
|
||||
static struct pkg *prev_pkgs, *prev_reachable_pkg;
|
||||
|
||||
static unsigned long active_set = 0;
|
||||
|
||||
@ -1248,7 +1248,9 @@ void inst_start(void)
|
||||
|
||||
active_frame_bbox = bbox_zero;
|
||||
prev_pkgs = pkgs;
|
||||
prev_reachable_pkg = reachable_pkg;
|
||||
pkgs = NULL;
|
||||
reachable_pkg = NULL;
|
||||
inst_select_pkg(NULL, 0);
|
||||
curr_pkg = pkgs;
|
||||
frame_instantiating = NULL;
|
||||
@ -1274,6 +1276,7 @@ void inst_revert(void)
|
||||
{
|
||||
free_pkgs(pkgs);
|
||||
pkgs = prev_pkgs;
|
||||
reachable_pkg = prev_reachable_pkg;
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user