gimp_get_images returns NULL pointer whilst num_images > 0
GIMP version: upstream, c9ccc16a979d3eeec1d7f723dc10e831593c5861
Note: bug reporters are expected to have verified the bug still exists either in the last stable version of GIMP or on updated development code (master branch).
Operating System: [Archlinux]
Package: [archlinux/aur/gimp-git]
Description of the bug
The following python code reproduces the error. Which is causing a segmentation fault from time to time.
import gi
gi.require_version('Gimp', '3.0')
import gi.repository.Gimp
gi.repository.Gimp.get_images()
The error starts here libgimp/gimpimage.c:211
Reproduction
Above.
Reproduction steps:
Above
Expected result:
List of Gimp.Image instances.
Actual result:
GList *
gimp_list_images (void)
{
GimpImage **images;
gint num_images;
GList *list = NULL;
gint i;
images = gimp_get_images (&num_images);
for (i = 0; i < num_images; i++)
list = g_list_prepend (list, images[i]);
g_free (images);
return g_list_reverse (list);
}
the variable images
equals 0, whilst num_images > 0
Additional information
Above