gtkhtml r8916 - trunk/gtkhtml



Author: tobiasmue
Date: Tue Aug 12 12:45:46 2008
New Revision: 8916
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=8916&view=rev

Log:
Move sanity checks from g_assert to g_return_[val_]_if_fail in htmlengine.c


Modified:
   trunk/gtkhtml/ChangeLog
   trunk/gtkhtml/htmlengine.c

Modified: trunk/gtkhtml/htmlengine.c
==============================================================================
--- trunk/gtkhtml/htmlengine.c	(original)
+++ trunk/gtkhtml/htmlengine.c	Tue Aug 12 12:45:46 2008
@@ -5093,7 +5093,7 @@
 {
 	g_return_if_fail (HTML_IS_ENGINE (e));
 
-	g_assert (e->block_redraw > 0);
+	g_return_if_fail (e->block_redraw > 0);
 
 	e->block_redraw --;
 	if (!e->block_redraw && e->need_redraw) {
@@ -5708,7 +5708,7 @@
 	GSList *l, *next;
 
 	g_return_if_fail (HTML_IS_ENGINE (e));
-	g_assert (!html_engine_frozen (e));
+	g_return_if_fail (!html_engine_frozen (e));
 	/* printf ("do_pending_expose\n"); */
 
 	for (l = e->pending_expose; l; l = next) {
@@ -5953,7 +5953,7 @@
 	gboolean finished = FALSE;
 
 	g_return_val_if_fail (HTML_IS_ENGINE (e), FALSE);
-	g_assert (e->replace_info);
+	g_return_val_if_fail (e->replace_info, FALSE);
 
 	switch (answer) {
 	case RQA_ReplaceAll:
@@ -5995,8 +5995,8 @@
 void
 html_engine_spell_check (HTMLEngine *e)
 {
-	g_assert (HTML_IS_ENGINE (e));
-	g_assert (e->clue);
+	g_return_if_fail (HTML_IS_ENGINE (e));
+	g_return_if_fail (e->clue);
 
 	e->need_spell_check = FALSE;
 
@@ -6014,8 +6014,8 @@
 void
 html_engine_clear_spell_check (HTMLEngine *e)
 {
-	g_assert (HTML_IS_ENGINE (e));
-	g_assert (e->clue);
+	g_return_if_fail (HTML_IS_ENGINE (e));
+	g_return_if_fail (e->clue);
 
 	e->need_spell_check = FALSE;
 
@@ -6373,7 +6373,7 @@
 
 	/* printf ("html_engine_add_expose\n"); */
 
-	g_assert (HTML_IS_ENGINE (e));
+	g_return_if_fail (HTML_IS_ENGINE (e));
 
 	r = g_new (struct HTMLEngineExpose, 1);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]