qapitrace: issue #218 crashes on glPopDebugGroup
qapitrace: issue #218 crashes on glPopDebugGroup

Problem:
dereferencing a NULL pointer.

Reason:
As mentioned in the issue description, a glPushDebugGroup and
glPopDebugGroup pair were in two different frames. The
TraceLoader:fetchFrameContents() function assumes they're in the
same frame and starts a new "groups" stack for each frame fetch.
On encountering a CALL_FLAG_MARKER_POP call, does

    groups.top()->finishedAddingChildren();

when in fact groups is empty and is dereferencing a NULL pointer.

In the other sample trace (sample-effects.trace) all glPush/Pop pairs
were in the same frame but one frame had an extra glPopDebugGroup
causing the same error.

Fix:
Add a groups.count() check before dereferencing groups.top()

Caveats:
Any unpaired glPopDebugGroup calls will be listed as regular gl calls.
Any unpaired glPushDebugGroup calls will end with the frame end.

Tested both sample crash traces; they no longer crash.
(apitrace-tests doesn't apply for testing this fix)

Signed-off-by: Lawrence L Love <56cf8886dc6699e02e776d6f61bed8eb7e161ec9@intel.com>

apitrace/apitrace,swq0553/apitrace,joshua5201/apitrace,trtt/apitrace,swq0553/apitrace,EoD/apitrace,trtt/apitrace,tuanthng/apitrace,joshua5201/apitrace,swq0553/apitrace,tuanthng/apitrace,schulmar/apitrace,EoD/apitrace,surround-io/apitrace,tuanthng/apitrace,joshua5201/apitrace,joshua5201/apitrace,EoD/apitrace,surround-io/apitrace,schulmar/apitrace,trtt/apitrace,swq0553/apitrace,apitrace/apitrace,apitrace/apitrace,schulmar/apitrace,surround-io/apitrace,trtt/apitrace,schulmar/apitrace,tuanthng/apitrace,surround-io/apitrace,swq0553/apitrace,schulmar/apitrace,tuanthng/apitrace,EoD/apitrace,apitrace/apitrace,surround-io/apitrace,trtt/apitrace,joshua5201/apitrace,EoD/apitrace