diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-08-29 15:47:03 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-08-29 15:47:03 +0400 |
commit | 160d8f6c0c14ef13ef2540e60a389933f9b8d009 (patch) | |
tree | 9d01f10190dabce2c9d94fbb8fea7af9c2703d32 /intern/cycles/render/session.cpp | |
parent | 47fb31404fcb7b3244d3a575807a5084996802cb (diff) |
Cycles: fix cuda assertion that could be triggerd sometimes, when trying to
tonemap an empty image.
Diffstat (limited to 'intern/cycles/render/session.cpp')
-rw-r--r-- | intern/cycles/render/session.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/intern/cycles/render/session.cpp b/intern/cycles/render/session.cpp index 274c61a283e..5465ddac06b 100644 --- a/intern/cycles/render/session.cpp +++ b/intern/cycles/render/session.cpp @@ -508,11 +508,13 @@ void Session::tonemap() task.pass = tile_manager.state.pass; task.resolution = tile_manager.state.resolution; - device->task_add(task); - device->task_wait(); + if(task.w > 0 && task.h > 0) { + device->task_add(task); + device->task_wait(); - /* set display to new size */ - display->draw_set(tile_manager.state.width, tile_manager.state.height); + /* set display to new size */ + display->draw_set(task.w, task.h); + } display_outdated = false; } |