python/retrace: Cope with null constant buffers.
authorJosé Fonseca <jfonseca@vmware.com>
Mon, 2 Nov 2009 09:47:47 +0000 (09:47 +0000)
committerJosé Fonseca <jfonseca@vmware.com>
Tue, 3 Nov 2009 17:12:33 +0000 (17:12 +0000)
src/gallium/state_trackers/python/retrace/interpreter.py

index c3bc6bc43c62a10e95dd168a516081b1328720b2..348f2e436831e89186895fc4a140e06ebf36de63 100755 (executable)
@@ -459,7 +459,7 @@ class Context(Object):
         sys.stdout.flush()
 
     def set_constant_buffer(self, shader, index, buffer):
-        if buffer is not None:
+        if buffer is not None and buffer.buffer is not None:
             self.real.set_constant_buffer(shader, index, buffer.buffer)
 
             self.dump_constant_buffer(buffer.buffer)