]> git.cworth.org Git - apitrace/blobdiff - retrace_stdc.cpp
Support const methods.
[apitrace] / retrace_stdc.cpp
index 59dcf4fc5d3a843cbe7e732e1e028100457fe66f..03c38653819bef94e826241ac1f8a46f6f0540cf 100644 (file)
@@ -77,6 +77,12 @@ upperBound(unsigned long long address) {
 void
 addRegion(unsigned long long address, void *buffer, unsigned long long size)
 {
+    if (!address) {
+        // Ignore NULL pointer
+        assert(!buffer);
+        return;
+    }
+
     // Forget all regions that intersect this new one.
     if (0) {
         RegionMap::iterator start = lowerBound(address);