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:
authorBastien Montagne <montagne29@wanadoo.fr>2019-08-05 15:24:44 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2019-08-05 15:24:44 +0300
commit38d7e14dc8bd1246a95570239971f61056f76227 (patch)
tree77094d72cfec2a1352d1df25c4d648832cffe486
parent9620b8f6bbcf8654d9a01f90cb4585ffec14368d (diff)
Fix (unreported0 bad usage of `do_versions_find_region()` in versionning code.
When NULL pointer can be a valid return value, one has to use `do_versions_find_region_or_null()` instead... Fixes asserts as reported in rBa2fe386153e.
-rw-r--r--source/blender/blenloader/intern/versioning_280.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/versioning_280.c b/source/blender/blenloader/intern/versioning_280.c
index 1573f4ed02f..0dbb1a92f30 100644
--- a/source/blender/blenloader/intern/versioning_280.c
+++ b/source/blender/blenloader/intern/versioning_280.c
@@ -3407,11 +3407,11 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
ARegion *ar = NULL;
if (sl->spacetype == SPACE_CLIP) {
if (((SpaceClip *)sl)->view == SC_VIEW_GRAPH) {
- ar = do_versions_find_region(regionbase, RGN_TYPE_PREVIEW);
+ ar = do_versions_find_region_or_null(regionbase, RGN_TYPE_PREVIEW);
}
}
else {
- ar = do_versions_find_region(regionbase, RGN_TYPE_WINDOW);
+ ar = do_versions_find_region_or_null(regionbase, RGN_TYPE_WINDOW);
}
if (ar != NULL) {
@@ -3560,7 +3560,7 @@ void blo_do_versions_280(FileData *fd, Library *UNUSED(lib), Main *bmain)
for (SpaceLink *sl = sa->spacedata.first; sl; sl = sl->next) {
if (sl->spacetype == SPACE_TEXT) {
ListBase *regionbase = (sl == sa->spacedata.first) ? &sa->regionbase : &sl->regionbase;
- ARegion *ar = do_versions_find_region(regionbase, RGN_TYPE_UI);
+ ARegion *ar = do_versions_find_region_or_null(regionbase, RGN_TYPE_UI);
if (ar) {
ar->alignment = RGN_ALIGN_RIGHT;
}