|
@@ -49,9 +49,11 @@ static struct image_type image_types_end[0]
|
49
|
49
|
int register_image ( struct image *image ) {
|
50
|
50
|
static unsigned int imgindex = 0;
|
51
|
51
|
|
52
|
|
- /* Create image name */
|
53
|
|
- snprintf ( image->name, sizeof ( image->name ), "img%d",
|
54
|
|
- imgindex++ );
|
|
52
|
+ /* Create image name if it doesn't already have one */
|
|
53
|
+ if ( ! image->name[0] ) {
|
|
54
|
+ snprintf ( image->name, sizeof ( image->name ), "img%d",
|
|
55
|
+ imgindex++ );
|
|
56
|
+ }
|
55
|
57
|
|
56
|
58
|
/* Add to image list */
|
57
|
59
|
list_add_tail ( &image->list, &images );
|