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:
authorDalai Felinto <dfelinto@gmail.com>2015-04-30 16:22:47 +0300
committerDalai Felinto <dfelinto@gmail.com>2015-04-30 18:12:22 +0300
commit179fff94e8a1977af95fe30f98f1a2b81699089a (patch)
tree7c87e1e9d60139b99590cf4a6d5d8cd688d53b75 /source/blender
parent69ef1a3a83f47dbcc25d05c8a87f73fbfcd0667d (diff)
Revert "Fix T44556: Crash on the World Properties > Preview"
This reverts commit 4bcc7a2ec6bf6937778a2227c7f938c50a0fafe5.
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/editors/render/render_preview.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c
index b9aa6ac6e72..2c353c13334 100644
--- a/source/blender/editors/render/render_preview.c
+++ b/source/blender/editors/render/render_preview.c
@@ -532,7 +532,6 @@ static bool ed_preview_draw_rect(ScrArea *sa, int split, int first, rcti *rect,
int newx = BLI_rcti_size_x(rect);
int newy = BLI_rcti_size_y(rect);
bool ok = false;
- bool has_rectf = false;
if (!split || first) sprintf(name, "Preview %p", (void *)sa);
else sprintf(name, "SecondPreview %p", (void *)sa);
@@ -552,14 +551,11 @@ static bool ed_preview_draw_rect(ScrArea *sa, int split, int first, rcti *rect,
re = RE_GetRender(name);
RE_AcquireResultImageViews(re, &rres);
- /* TODO(sergey): Is there a cleaner way to do this? */
- if (!BLI_listbase_is_empty(&rres.views)) {
- /* material preview only needs monoscopy (view 0) */
- rv = RE_RenderViewGetById(&rres, 0);
- has_rectf = rv->rectf != NULL;
- }
- if (has_rectf) {
+ /* material preview only needs monoscopy (view 0) */
+ rv = RE_RenderViewGetById(&rres, 0);
+
+ if (rv->rectf) {
if (ABS(rres.rectx - newx) < 2 && ABS(rres.recty - newy) < 2) {