Freestyle relies on render layer name (RenderLayer::name) to find the render layer that corresponds to a scene render layer being rendered. When the active render layer is disabled during preview rendering, the function render_result_new() populates the list of render layers (RenderResult::layers) with an unnamed render layer while setting the active scene render layer index to zero. This commit fixes the missing initialization of the render layer name by referring to that of the first in the list of scene render layers.