mirror of
git://projects.qi-hardware.com/fped.git
synced 2024-11-06 02:12:48 +02:00
- gui.c (change_world_reselect): take into account that we may get called
with a selected object but no selected instance. In this case, don't try to re-select. (Not perfect, but better than the crash this caused so far.) git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5999 99fdad57-331a-0410-800a-d7fa5415bdb3
This commit is contained in:
parent
49a1bbdd05
commit
1409cfafd8
11
gui.c
11
gui.c
@ -342,6 +342,17 @@ void change_world_reselect(void)
|
||||
{
|
||||
struct obj *selected_obj;
|
||||
|
||||
/*
|
||||
* We can edit an object even if it's not selected if it was picked
|
||||
* via the item view. inst_select_obj tries to find an instance, but
|
||||
* if there's never been a successful instantiation since creation of
|
||||
* the object or if the object is unreachable for some other reason,
|
||||
* then selected_inst will be NULL.
|
||||
*/
|
||||
if (!selected_inst) {
|
||||
change_world();
|
||||
return;
|
||||
}
|
||||
selected_obj = selected_inst->obj;
|
||||
change_world();
|
||||
inst_select_obj(selected_obj);
|
||||
|
Loading…
Reference in New Issue
Block a user