]> git.cworth.org Git - apitrace/commitdiff
Ensure that calls for traces with a single frame are shown.
authorJosé Fonseca <jfonseca@vmware.com>
Thu, 1 Sep 2011 18:17:41 +0000 (19:17 +0100)
committerJosé Fonseca <jfonseca@vmware.com>
Thu, 1 Sep 2011 18:17:41 +0000 (19:17 +0100)
Otherwise we get a solitary "Frame 0" node without children.

gui/loaderthread.cpp

index f311fe0d3e33f52e19bfcc1c471d8666a809d953..03f0ccd0f68569983d7bc9b0ca362bae23ab8f70 100644 (file)
@@ -95,6 +95,10 @@ void LoaderThread::run()
     //  it's just a bunch of Delete calls for every object
     //  after the last SwapBuffers
     if (currentFrame) {
+        if (!frames.count()) {
+            calls.squeeze();
+            currentFrame->setCalls(calls, binaryDataSize);
+        }
         frames.append(currentFrame);
         currentFrame = 0;
     }