mirror of https://github.com/GNOME/gimp.git
Merged fix from gimp-1-2:
2001-01-09 Sven Neumann <sven@gimp.org> Merged fix from gimp-1-2: * app/gimpbrushlist.c * app/gradient.c * app/palette.c * app/patterns.c: check for NULL pointers before doing strcmp on default names. The default names for brushes, patterns, ... can be NULL if they were not set in a readable gimprc file. * app/gimprc.c: warn the user if the systemwide gimprc couldn't be read.
This commit is contained in:
parent
d52c61a717
commit
c935ec8367
14
ChangeLog
14
ChangeLog
|
@ -1,3 +1,17 @@
|
|||
2001-01-09 Sven Neumann <sven@gimp.org>
|
||||
|
||||
Merged fix from gimp-1-2:
|
||||
|
||||
* app/gimpbrushlist.c
|
||||
* app/gradient.c
|
||||
* app/palette.c
|
||||
* app/patterns.c: check for NULL pointers before doing strcmp on
|
||||
default names. The default names for brushes, patterns, ... can
|
||||
be NULL if they were not set in a readable gimprc file.
|
||||
|
||||
* app/gimprc.c: warn the user if the systemwide gimprc couldn't be
|
||||
read.
|
||||
|
||||
2001-01-09 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* app/color_notebook.c: Show the "Alpha" scale only when needed.
|
||||
|
|
|
@ -455,10 +455,10 @@ gimp_brush_list_get_brush (GimpBrushList *blist,
|
|||
GimpBrush *brushp;
|
||||
GSList *list;
|
||||
|
||||
if (blist == NULL)
|
||||
if (blist == NULL || name == NULL)
|
||||
return NULL;
|
||||
|
||||
for (list = GIMP_LIST (brush_list)->list; list; list = g_slist_next (list))
|
||||
for (list = GIMP_LIST (blist)->list; list; list = g_slist_next (list))
|
||||
{
|
||||
brushp = (GimpBrush *) list->data;
|
||||
|
||||
|
@ -468,3 +468,4 @@ gimp_brush_list_get_brush (GimpBrushList *blist,
|
|||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
|
|
@ -426,7 +426,8 @@ parse_gimprc (void)
|
|||
else
|
||||
libfilename = g_strdup (gimp_system_rc_file ());
|
||||
|
||||
parse_gimprc_file (libfilename);
|
||||
if (! parse_gimprc_file (libfilename))
|
||||
g_message ("Can't open '%s' for reading.", libfilename);
|
||||
|
||||
if (alternate_gimprc != NULL)
|
||||
filename = g_strdup (alternate_gimprc);
|
||||
|
|
|
@ -702,6 +702,9 @@ gradient_list_get_gradient (GSList *list,
|
|||
{
|
||||
gradient_t *gradient;
|
||||
|
||||
if (name == NULL)
|
||||
return NULL;
|
||||
|
||||
for (; list; list = g_slist_next (list))
|
||||
{
|
||||
gradient = (gradient_t *) list->data;
|
||||
|
|
|
@ -702,6 +702,9 @@ gradient_list_get_gradient (GSList *list,
|
|||
{
|
||||
gradient_t *gradient;
|
||||
|
||||
if (name == NULL)
|
||||
return NULL;
|
||||
|
||||
for (; list; list = g_slist_next (list))
|
||||
{
|
||||
gradient = (gradient_t *) list->data;
|
||||
|
|
|
@ -702,6 +702,9 @@ gradient_list_get_gradient (GSList *list,
|
|||
{
|
||||
gradient_t *gradient;
|
||||
|
||||
if (name == NULL)
|
||||
return NULL;
|
||||
|
||||
for (; list; list = g_slist_next (list))
|
||||
{
|
||||
gradient = (gradient_t *) list->data;
|
||||
|
|
|
@ -482,7 +482,8 @@ palette_entries_load (gchar *filename)
|
|||
palette_entries_list_insert (entries);
|
||||
|
||||
/* Check if the current palette is the default one */
|
||||
if (strcmp (default_palette, g_basename (filename)) == 0)
|
||||
if (default_palette &&
|
||||
strcmp (default_palette, g_basename (filename)) == 0)
|
||||
default_palette_entries = entries;
|
||||
}
|
||||
|
||||
|
|
|
@ -482,7 +482,8 @@ palette_entries_load (gchar *filename)
|
|||
palette_entries_list_insert (entries);
|
||||
|
||||
/* Check if the current palette is the default one */
|
||||
if (strcmp (default_palette, g_basename (filename)) == 0)
|
||||
if (default_palette &&
|
||||
strcmp (default_palette, g_basename (filename)) == 0)
|
||||
default_palette_entries = entries;
|
||||
}
|
||||
|
||||
|
|
|
@ -158,6 +158,9 @@ pattern_list_get_pattern (GSList *list,
|
|||
{
|
||||
GPattern *pattern;
|
||||
|
||||
if (name == NULL)
|
||||
return NULL;
|
||||
|
||||
for (; list; list = g_slist_next (list))
|
||||
{
|
||||
pattern = (GPattern *) list->data;
|
||||
|
|
|
@ -702,6 +702,9 @@ gradient_list_get_gradient (GSList *list,
|
|||
{
|
||||
gradient_t *gradient;
|
||||
|
||||
if (name == NULL)
|
||||
return NULL;
|
||||
|
||||
for (; list; list = g_slist_next (list))
|
||||
{
|
||||
gradient = (gradient_t *) list->data;
|
||||
|
|
|
@ -482,7 +482,8 @@ palette_entries_load (gchar *filename)
|
|||
palette_entries_list_insert (entries);
|
||||
|
||||
/* Check if the current palette is the default one */
|
||||
if (strcmp (default_palette, g_basename (filename)) == 0)
|
||||
if (default_palette &&
|
||||
strcmp (default_palette, g_basename (filename)) == 0)
|
||||
default_palette_entries = entries;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue