Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_nla/space_nla.c')
-rw-r--r--source/blender/editors/space_nla/space_nla.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/source/blender/editors/space_nla/space_nla.c b/source/blender/editors/space_nla/space_nla.c
index 90f9996e392..f2e0abe1e60 100644
--- a/source/blender/editors/space_nla/space_nla.c
+++ b/source/blender/editors/space_nla/space_nla.c
@@ -69,18 +69,13 @@
ARegion *nla_has_buttons_region(ScrArea *sa)
{
ARegion *ar, *arnew;
-
- for (ar= sa->regionbase.first; ar; ar= ar->next) {
- if (ar->regiontype==RGN_TYPE_UI)
- return ar;
- }
-
+
+ ar= BKE_area_find_region_type(sa, RGN_TYPE_UI);
+ if(ar) return ar;
+
/* add subdiv level; after main */
- for (ar= sa->regionbase.first; ar; ar= ar->next) {
- if (ar->regiontype==RGN_TYPE_WINDOW)
- break;
- }
-
+ ar= BKE_area_find_region_type(sa, RGN_TYPE_WINDOW);
+
/* is error! */
if (ar==NULL) return NULL;