mirror of https://github.com/GNOME/gimp.git
app: fix address sanitizer error.
The error is: > app/widgets/gimpdeviceinfo.c:387:13: runtime error: null pointer passed as argument 1, which is declared to never be nul
This commit is contained in:
parent
86693d1839
commit
e3bb3bf57f
|
@ -384,7 +384,8 @@ gimp_device_info_set_property (GObject *object,
|
|||
|
||||
info->priv->n_keys = n_device_values;
|
||||
info->priv->keys = g_renew (GimpDeviceKey, info->priv->keys, info->priv->n_keys);
|
||||
memset (info->priv->keys, 0, info->priv->n_keys * sizeof (GimpDeviceKey));
|
||||
if (info->priv->n_keys > 0)
|
||||
memset (info->priv->keys, 0, info->priv->n_keys * sizeof (GimpDeviceKey));
|
||||
|
||||
for (i = 0; i < n_device_values; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue