]> git.sesse.net Git - casparcg/commitdiff
git-svn-id: https://casparcg.svn.sourceforge.net/svnroot/casparcg/server/branches...
authorronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Mon, 20 Feb 2012 11:06:52 +0000 (11:06 +0000)
committerronag <ronag@362d55ac-95cf-4e76-9f9a-cbaa9c17b72d>
Mon, 20 Feb 2012 11:06:52 +0000 (11:06 +0000)
accelerator/ogl/util/device.cpp

index 0fab52d2eaa7234a3f8960debc8403caabefd2e3..248191ff2192bc42d29ed2d87354e0dd61ac8eaa 100644 (file)
@@ -248,11 +248,8 @@ struct device::impl : public std::enable_shared_from_this<impl>
                auto self = shared_from_this();\r
                return async(launch::deferred, [self, buffer]() mutable -> array<const std::uint8_t>\r
                {\r
-                       const auto& buf = buffer.get();\r
-                       if(!buf->data())\r
-                               self->alloc_executor_.invoke(std::bind(&buffer::map, std::ref(buf))); // Defer blocking "map" call until data is needed.\r
-\r
-                       return array<const std::uint8_t>(buf->data(), buf->size(), true, buffer);\r
+                       self->alloc_executor_.invoke(std::bind(&buffer::map, std::ref(buffer))); // Defer blocking "map" call until data is needed.\r
+                       return array<const std::uint8_t>(buffer->data(), buffer->size(), true, buffer);\r
                });\r
        }\r
 };\r