On Mon, Jul 25, 2016 at 06:37:00PM +0200, Francois Gouget wrote: > On Sun, 24 Jul 2016, Uri Lublin wrote: > [...] > > This patch prevents a crash as few lines below there is access > > to agent->video_encoder->codec_type. > > > > I think it would be better to make the check it in > > dcc_create_stream(), and replace the patch here to assert. > > I think it makes more sense to have it this way. I agree, we could add more checks in dcc_create_stream() if we want, but looking thhrough the code, most dereferences of agent->video_encoder are protected by a NULL check. The marshalling code is one of the few places where it's not done, so adding it here makes sense for consistency reasons. If a later patch adds more magic to dcc_create_stream(), we can look which agent->video_encoder NULL checks should be replaced with g_return_if_fail() or similar. Christophe
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ Spice-devel mailing list Spice-devel@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/spice-devel