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:
Jehan 2023-04-18 23:34:04 +02:00
parent 86693d1839
commit e3bb3bf57f
1 changed files with 2 additions and 1 deletions

View File

@ -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++)
{