]> git.cworth.org Git - apitrace/blobdiff - wrappers/d3d9trace.py
Fix compressed texture size computation.
[apitrace] / wrappers / d3d9trace.py
index 9185f038e6a63e5d8a6cd96f7881ffd7c4878805..d3f2e024a0330146d35f79a2de80fd05148fbcf2 100644 (file)
@@ -53,7 +53,7 @@ class D3D9Tracer(DllTracer):
 
     def implementWrapperInterfaceMethodBody(self, interface, base, method):
         if method.name in ('Unlock', 'UnlockRect', 'UnlockBox'):
-            print '    if (m_pbData) {'
+            print '    if (_LockedSize && m_pbData) {'
             self.emit_memcpy('(LPBYTE)m_pbData', '(LPBYTE)m_pbData', '_LockedSize')
             print '    }'