Applied a change suggested by Steinar H. Gunderson.

Fixes crashing on empty images (bug #5536).


--Sven
This commit is contained in:
Sven Neumann 2000-01-25 21:00:54 +00:00
parent 2d98d65fbd
commit f3eb81f4c2
4 changed files with 8 additions and 3 deletions

View File

@ -1,3 +1,8 @@
Tue Jan 25 21:58:49 CET 2000 Sven Neumann <sven@gimp.org>
* app/layer.c: applied a change suggested by Steinar H. Gunderson.
Fixes crashing on empty images (bug #5536).
Tue Jan 25 21:16:57 CET 2000 Sven Neumann <sven@gimp.org>
* app/gdisplay.c: disable "Layer to Imagesize" on empty images

View File

@ -1099,7 +1099,7 @@ layer_has_alpha (Layer *layer)
gboolean
layer_is_floating_sel (Layer *layer)
{
if (layer->fs.drawable != NULL)
if (layer != NULL && layer->fs.drawable != NULL)
return TRUE;
else
return FALSE;

View File

@ -1099,7 +1099,7 @@ layer_has_alpha (Layer *layer)
gboolean
layer_is_floating_sel (Layer *layer)
{
if (layer->fs.drawable != NULL)
if (layer != NULL && layer->fs.drawable != NULL)
return TRUE;
else
return FALSE;

View File

@ -1099,7 +1099,7 @@ layer_has_alpha (Layer *layer)
gboolean
layer_is_floating_sel (Layer *layer)
{
if (layer->fs.drawable != NULL)
if (layer != NULL && layer->fs.drawable != NULL)
return TRUE;
else
return FALSE;