Skip to content

gio-tool-info: Prevent criticals if mount options are not available

Ondrej Holy requested to merge wip/oholy/gio-info-prevent-criticals into master

NULL is valid return value for the g_unix_mount_get_options function because mount options are currently provided only by libmount implementation. However, the gio tool passes the returned value to the g_strescape function without checking, which produces the following critical warning:

GLib-CRITICAL **: 13:47:15.294: g_strescape: assertion 'source != NULL' failed

Let's add the missing check to prevent the critical warnings.

Merge request reports