summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorColomban Wendling <[email protected]>2023-11-07 15:23:47 +0100
committerraveit65 <[email protected]>2023-12-25 17:32:14 +0100
commitcad9b11da5e2fe30f2033797075b132534ae5c3e (patch)
tree36640d465bc4cc252d9c680d2ff3da6518326d7c /.github
parentcadcbb2530d7440b9c756c37c83c30cc5748ab15 (diff)
downloadmate-media-cad9b11da5e2fe30f2033797075b132534ae5c3e.tar.bz2
mate-media-cad9b11da5e2fe30f2033797075b132534ae5c3e.tar.xz
Fix various instance checks
The g_return*_if_fail() calls should use PREFIX_IS_TYPE_NAME [1], which returns whether the given instance is of the right type, not PREFIX_TYPE_NAME [2], which checks whether the given instance if of the right type, warns if not, and returns the passed-in instance unchanged. Using the wrong one means the returned value is the passed-in pointer, and thus passes the g_return*_if_fail() whenever the pointer is non-NULL, no matter whether it's of the right type or not. A warning would still be emitted by g_type_check_instance_cast(), but the execution wouldn't get short-circuited. [1] calls g_type_check_instance_is_a() [2] calls g_type_check_instance_cast()
Diffstat (limited to '.github')
0 files changed, 0 insertions, 0 deletions