GNOME Bugzilla – Bug 750154
childproxy: don't crash when interface methods are not implemented
Last modified: 2018-01-26 11:27:25 UTC
By checking if virtual methods are implemented before calling them.
Created attachment 304314 [details] [review] gstchildproxy: Fix segmentation fault.
Comment on attachment 304314 [details] [review] gstchildproxy: Fix segmentation fault. Let's do the GET_INTERFACE() only once :)
Created attachment 367147 [details] [review] childproxy: gracefully handle methods being NULL Alternative patch. Question is: is it allowed for these methods to be NULL? If yes, we should use my patch. If not we should probably assert, or use my patch with an extra warning. It's not a programming mistake by the application developer / caller, so I'm not sure if g_return_if_fail() is quite right here.
Review of attachment 367147 [details] [review]: Looks good to me. Not sure if we can check that all methods are implemented during instantiation time instead, but this is probably not that performance critical anyway.
commit db1d99db76379e8bceb26fcee951822fd5e1819b (HEAD -> master) Author: Tim-Philipp Müller <tim@centricular.com> Date: Sat Jan 20 15:30:53 2018 +0000 childproxy: gracefully handle methods being NULL Do this for all method invoke functions for consistency. https://bugzilla.gnome.org/show_bug.cgi?id=750154