Date: | 2011-01-22 01:54:56 (13 years 2 months ago) |
---|---|
Author: | werner |
Commit: | 1409cfafd8e4cbb769ebf094b68972bfcfc13078 |
Message: | - 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 |
Files: |
gui.c (1 diff) |
Change Details
gui.c | ||
---|---|---|
342 | 342 | { |
343 | 343 | struct obj *selected_obj; |
344 | 344 | |
345 | /* | |
346 | * We can edit an object even if it's not selected if it was picked | |
347 | * via the item view. inst_select_obj tries to find an instance, but | |
348 | * if there's never been a successful instantiation since creation of | |
349 | * the object or if the object is unreachable for some other reason, | |
350 | * then selected_inst will be NULL. | |
351 | */ | |
352 | if (!selected_inst) { | |
353 | change_world(); | |
354 | return; | |
355 | } | |
345 | 356 | selected_obj = selected_inst->obj; |
346 | 357 | change_world(); |
347 | 358 | inst_select_obj(selected_obj); |
Branches:
master