-
Philip Withnall authored
This used to happen consistently before !4290, but that MR changed it so that `data` could be non-`NULL` if `size == 0` if the new inline code path is taken. While users of `GBytes` shouldn’t be dereferencing the data if the bytes’ length is zero, it’s definitely safer to make sure the data is `NULL` in that case. This shouldn’t break the expectations of any third party code because it’s restoring the behaviour from before !4290. Signed-off-by:
Philip Withnall <pwithnall@gnome.org> Fixes: #3562
Philip Withnall authoredThis used to happen consistently before !4290, but that MR changed it so that `data` could be non-`NULL` if `size == 0` if the new inline code path is taken. While users of `GBytes` shouldn’t be dereferencing the data if the bytes’ length is zero, it’s definitely safer to make sure the data is `NULL` in that case. This shouldn’t break the expectations of any third party code because it’s restoring the behaviour from before !4290. Signed-off-by:
Philip Withnall <pwithnall@gnome.org> Fixes: #3562
Loading