Don't clear buffers if we have no native graphics context

Fixes ./servo -z for content that calls window.close(), such as content tests.
This commit is contained in:
Keegan McAllister 2013-12-11 15:26:05 -08:00
parent 8891587901
commit f0613184cf

View file

@ -174,7 +174,9 @@ impl<C: RenderListener + Send,T:Send+Freeze> RenderTask<C,T> {
render_task.start();
// Destroy all the buffers.
render_task.buffer_map.clear(native_graphics_context!(render_task));
render_task.native_graphics_context.as_ref().map(|ctx|
render_task.buffer_map.clear(ctx)
);
}
}