Re: [PATCH spice-gtk v2 4/8] display: return NULL in spice_display_get_gl_scanout()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Mar 24, 2016 at 12:39 AM, Marc-André Lureau <mlureau@xxxxxxxxxx> wrote:
>> When / how it can happen ? Looking at gl_scanout() there is g_return if
>> scanout == NULL, if NULL is a valid/expected return value then that
>> g_return should be changed.
>
> Good point. AI think I wrote this initially thinking that no one should ever call get_gl_scanout() without having first received the scanout notification, but that assumption is wrong. It should be fine to call get_gl_scanout() and it's easier to deal with a NULL return value rather than checking the returned scanout.fd == -1.  I'll change the assert. (btw, the set_static_boxed for the property should be fine)


Actually, gl_scanout() should only be called with a valid scanout, the
patch doesn't need to be modified then. If you prefer, we can add a
comment above the g_return_if_fail(scanout).

thanks


-- 
Marc-André Lureau
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]