Commit 8b9456f6 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

don't emit critical warnings about a messed up state of GimpConfigWriter

2004-08-29  Sven Neumann  <sven@gimp.org>

	* app/config/gimpconfigwriter.c: don't emit critical warnings
	about a messed up state of GimpConfigWriter if the writer is
	disabled because of a write error that occured earlier.
parent b7f58e16
......@@ -379,12 +379,13 @@ void
gimp_config_writer_revert (GimpConfigWriter *writer)
{
g_return_if_fail (writer != NULL);
g_return_if_fail (writer->depth > 0);
g_return_if_fail (writer->marker != -1);
if (writer->error)
return;
g_return_if_fail (writer->depth > 0);
g_return_if_fail (writer->marker != -1);
g_string_truncate (writer->buffer, writer->marker);
writer->depth--;
......@@ -401,11 +402,12 @@ void
gimp_config_writer_close (GimpConfigWriter *writer)
{
g_return_if_fail (writer != NULL);
g_return_if_fail (writer->depth > 0);
if (writer->error)
return;
g_return_if_fail (writer->depth > 0);
g_string_append_c (writer->buffer, ')');
if (--writer->depth == 0)
......@@ -516,11 +518,12 @@ gimp_config_writer_comment (GimpConfigWriter *writer,
#define LINE_LENGTH 75
g_return_if_fail (writer != NULL);
g_return_if_fail (writer->depth == 0);
if (writer->error)
return;
g_return_if_fail (writer->depth == 0);
if (!comment)
return;
......
......@@ -379,12 +379,13 @@ void
gimp_config_writer_revert (GimpConfigWriter *writer)
{
g_return_if_fail (writer != NULL);
g_return_if_fail (writer->depth > 0);
g_return_if_fail (writer->marker != -1);
if (writer->error)
return;
g_return_if_fail (writer->depth > 0);
g_return_if_fail (writer->marker != -1);
g_string_truncate (writer->buffer, writer->marker);
writer->depth--;
......@@ -401,11 +402,12 @@ void
gimp_config_writer_close (GimpConfigWriter *writer)
{
g_return_if_fail (writer != NULL);
g_return_if_fail (writer->depth > 0);
if (writer->error)
return;
g_return_if_fail (writer->depth > 0);
g_string_append_c (writer->buffer, ')');
if (--writer->depth == 0)
......@@ -516,11 +518,12 @@ gimp_config_writer_comment (GimpConfigWriter *writer,
#define LINE_LENGTH 75
g_return_if_fail (writer != NULL);
g_return_if_fail (writer->depth == 0);
if (writer->error)
return;
g_return_if_fail (writer->depth == 0);
if (!comment)
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment