-
Can't happen as GstElement *e is not NULL but not checking can yield warning from compilers. > spice-gstaudio.c: In function ‘playback_volume_changed’: > /usr/include/glib-2.0/gobject/gtype.h:2280:70: error: potential null pointer dereference [-Werror=null-dereference] > #define _G_TYPE_IGC(ip, gt, ct) ((ct*) (((GTypeInstance*) ip)->g_class)) > ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ > /usr/include/glib-2.0/gobject/gtype.h:525:66: note: in expansion of macro ‘_G_TYPE_IGC’ > #define G_TYPE_INSTANCE_GET_CLASS(instance, g_type, c_type) (_G_TYPE_IGC ((instance), (g_type), c_type)) > ^~~~~~~~~~~ > /usr/include/glib-2.0/gobject/gobject.h:86:38: note: in expansion of macro ‘G_TYPE_INSTANCE_GET_CLASS’ > #define G_OBJECT_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS ((object), G_TYPE_OBJECT, GObjectClass)) > ^~~~~~~~~~~~~~~~~~~~~~~~~ > spice-gstaudio.c:373:45: note: in expansion of macro ‘G_OBJECT_GET_CLASS’ > } else if (g_object_class_find_property(G_OBJECT_GET_CLASS (e), "volume") != NULL) { > ^~~~~~~~~~~~~~~~~~ Signed-off-by: Victor Toso <victortoso@redhat.com> Acked-by: Frediano Ziglio <fziglio@redhat.com>
21e753ff