avoid potential crash (access pointer *after* precondition check).

2003-10-23  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-appearance.c
	(gimp_display_shell_set_padding): avoid potential crash (access
	pointer *after* precondition check).
This commit is contained in:
Michael Natterer 2003-10-23 12:08:16 +00:00 committed by Michael Natterer
parent 507b19bc91
commit 51c13ef06d
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2003-10-23 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-appearance.c
(gimp_display_shell_set_padding): avoid potential crash (access
pointer *after* precondition check).
2003-10-23 Michael Natterer <mitch@gimp.org>
* app/gui/preferences-dialog.c (prefs_display_options_frame_add):

View file

@ -395,12 +395,13 @@ gimp_display_shell_set_padding (GimpDisplayShell *shell,
const GimpRGB *padding_color)
{
GimpDisplayOptions *options;
GimpRGB color = *padding_color;
GimpRGB color;
g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
g_return_if_fail (padding_color != NULL);
options = GET_OPTIONS (shell);
color = *padding_color;
switch (padding_mode)
{