mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-29 15:52:07 +00:00
Initialize the thing we're going to test to see whether we
succeeded... otherwise we'll be testing random quantities. Bug 384264, r+sr=roc
This commit is contained in:
parent
d4193fc178
commit
5594639fe8
@ -67,6 +67,9 @@ gfxXlibNativeRenderer::Draw(Display* dpy, gfxContext* ctx, int width, int height
|
||||
{
|
||||
NativeRenderingClosure closure = { this, NS_OK };
|
||||
cairo_xlib_drawing_result_t result;
|
||||
// Make sure result.surface is null to start with; we rely on it
|
||||
// being non-null meaning that a surface actually got allocated.
|
||||
result.surface = NULL;
|
||||
|
||||
if (output) {
|
||||
output->mSurface = NULL;
|
||||
@ -98,6 +101,7 @@ gfxXlibNativeRenderer::Draw(Display* dpy, gfxContext* ctx, int width, int height
|
||||
output ? &result : NULL);
|
||||
if (NS_FAILED(closure.mRV)) {
|
||||
if (result.surface) {
|
||||
NS_ASSERTION(output, "How did that happen?");
|
||||
cairo_surface_destroy (result.surface);
|
||||
}
|
||||
return closure.mRV;
|
||||
|
Loading…
Reference in New Issue
Block a user