зеркало из https://github.com/mozilla/pjs.git
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:
Родитель
73f31550fa
Коммит
f6a1612e27
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче