Don't g_snprintf into a NULL pointer, which happened in case last_opened_size

was greater than 9.
This commit is contained in:
Tor Lillqvist 1999-01-31 00:57:45 +00:00
parent f9a2979b1a
commit 07686fcd48
5 changed files with 12 additions and 4 deletions

View File

@ -1,3 +1,7 @@
Sat Jan 30 23:47:37 1999 Tor Lillqvist <tml@iki.fi>
* app/menus.c (menus_init_mru): Don't g_snprintf into a NULL pointer.
Wed Jan 27 21:52:43 GMT 1999 Austin Donnelly <austin@gimp.org>
* app/scale.c: oops - should use the image resolution, not the

View File

@ -497,7 +497,8 @@ menus_init_mru (void)
last_opened_entries[i].item_type = NULL;
g_snprintf (path, MRU_MENU_ENTRY_SIZE, _("/File/MRU%02d"), i + 1);
g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "<control>%d", i + 1);
if (accelerator != NULL)
g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "<control>%d", i + 1);
}
gtk_item_factory_create_items_ac (toolbox_factory, last_opened_size,

View File

@ -497,7 +497,8 @@ menus_init_mru (void)
last_opened_entries[i].item_type = NULL;
g_snprintf (path, MRU_MENU_ENTRY_SIZE, _("/File/MRU%02d"), i + 1);
g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "<control>%d", i + 1);
if (accelerator != NULL)
g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "<control>%d", i + 1);
}
gtk_item_factory_create_items_ac (toolbox_factory, last_opened_size,

View File

@ -497,7 +497,8 @@ menus_init_mru (void)
last_opened_entries[i].item_type = NULL;
g_snprintf (path, MRU_MENU_ENTRY_SIZE, _("/File/MRU%02d"), i + 1);
g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "<control>%d", i + 1);
if (accelerator != NULL)
g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "<control>%d", i + 1);
}
gtk_item_factory_create_items_ac (toolbox_factory, last_opened_size,

View File

@ -497,7 +497,8 @@ menus_init_mru (void)
last_opened_entries[i].item_type = NULL;
g_snprintf (path, MRU_MENU_ENTRY_SIZE, _("/File/MRU%02d"), i + 1);
g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "<control>%d", i + 1);
if (accelerator != NULL)
g_snprintf (accelerator, MRU_MENU_ACCEL_SIZE, "<control>%d", i + 1);
}
gtk_item_factory_create_items_ac (toolbox_factory, last_opened_size,