diff options
author | Ton Roosendaal <ton@blender.org> | 2009-01-23 20:42:36 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-01-23 20:42:36 +0300 |
commit | 4531e8e6a731af71936d09bb79a15297685ff0dc (patch) | |
tree | de2f6a492c6b00d376de9084612e8c470de202a3 /source/blender/blenkernel/intern | |
parent | 66437a62a73966de8ccb673473ba69d6c1ed66a3 (diff) |
2.5
File reading of 2.50 files fixed.
- it now exits nicely from queues without using free'd memory
(checks CTX_wm_window(C) to be NULL)
- code that matched current (ghost) window with new situation
lacked setting a pointer good.
Overall cleaned some parts too; like context clears now all
wm related pointers when you set a new wm, window or area.
Diffstat (limited to 'source/blender/blenkernel/intern')
-rw-r--r-- | source/blender/blenkernel/intern/context.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/context.c b/source/blender/blenkernel/intern/context.c index 81712acee5c..2a24e5a9d0f 100644 --- a/source/blender/blenkernel/intern/context.c +++ b/source/blender/blenkernel/intern/context.c @@ -197,6 +197,10 @@ struct uiBlock *CTX_wm_ui_block(const bContext *C) void CTX_wm_manager_set(bContext *C, wmWindowManager *wm) { C->wm.manager= wm; + C->wm.window= NULL; + C->wm.screen= NULL; + C->wm.area= NULL; + C->wm.region= NULL; } void CTX_wm_window_set(bContext *C, wmWindow *win) @@ -204,17 +208,22 @@ void CTX_wm_window_set(bContext *C, wmWindow *win) C->wm.window= win; C->wm.screen= (win)? win->screen: NULL; C->data.scene= (C->wm.screen)? C->wm.screen->scene: NULL; + C->wm.area= NULL; + C->wm.region= NULL; } void CTX_wm_screen_set(bContext *C, bScreen *screen) { C->wm.screen= screen; C->data.scene= (C->wm.screen)? C->wm.screen->scene: NULL; + C->wm.area= NULL; + C->wm.region= NULL; } void CTX_wm_area_set(bContext *C, ScrArea *area) { C->wm.area= area; + C->wm.region= NULL; } void CTX_wm_region_set(bContext *C, ARegion *region) |