@@ -254,6 +254,8 @@ row_dirty_set(Row *row, gboolean clear_error)
254254void
255255row_error_set (Row * row )
256256{
257+ workspace_error_sanity (row -> ws );
258+
257259 if (!row -> err ) {
258260 Workspace * ws = row -> ws ;
259261 gboolean was_clear = ws -> errors == NULL ;
@@ -295,6 +297,8 @@ row_error_set(Row *row)
295297 expr_error_set (row -> top_row -> expr );
296298 }
297299 }
300+
301+ workspace_error_sanity (row -> ws );
298302}
299303
300304/* Clear error state ... called from expr_error_clear() ... don't call this
@@ -303,7 +307,9 @@ row_error_set(Row *row)
303307void
304308row_error_clear (Row * row )
305309{
306- if (row -> err && row -> ws ) {
310+ workspace_error_sanity (row -> ws );
311+
312+ if (row -> err ) {
307313 Workspace * ws = row -> ws ;
308314
309315 ws -> errors = g_slist_remove (ws -> errors , row );
@@ -321,9 +327,9 @@ row_error_clear(Row *row)
321327 * The code may contain pointers to dead symbols if we were in
322328 * error because they were undefined.
323329 */
324- if (row -> child_rhs && row -> child_rhs -> itext )
325- heapmodel_set_modified (
326- HEAPMODEL (row -> child_rhs -> itext ), TRUE);
330+ if (row -> child_rhs &&
331+ row -> child_rhs -> itext )
332+ heapmodel_set_modified ( HEAPMODEL (row -> child_rhs -> itext ), TRUE);
327333
328334 /* All errors gone? Ws changed too.
329335 */
@@ -333,11 +339,14 @@ row_error_clear(Row *row)
333339 /* Is this a local row? Clear the top row error as well, in
334340 * case it's in error because of us.
335341 */
336- if (row != row -> top_row && row -> top_row -> expr ) {
342+ if (row != row -> top_row &&
343+ row -> top_row -> expr ) {
337344 expr_error_clear (row -> top_row -> expr );
338345 row_dirty_set (row -> top_row , TRUE);
339346 }
340347 }
348+
349+ workspace_error_sanity (row -> ws );
341350}
342351
343352/* Break a dependency.
@@ -387,9 +396,11 @@ row_dispose(GObject *gobject)
387396
388397 /* Reset state. Also see row_parent_remove().
389398 */
390- row_hide_dependents (row );
391399 if (row -> expr )
392400 expr_error_clear (row -> expr );
401+
402+ row_hide_dependents (row );
403+
393404 if (col &&
394405 col -> last_select == row )
395406 col -> last_select = NULL ;
@@ -1571,6 +1582,8 @@ row_recomp_row(Row *row)
15711582static void
15721583row_recomp_all (Row * top_row )
15731584{
1585+ workspace_error_sanity (top_row -> ws );
1586+
15741587 /* Rebuild all dirty rows.
15751588 */
15761589 while (!top_row -> err && top_row -> recomp ) {
@@ -1608,6 +1621,8 @@ row_recomp_all(Row *top_row)
16081621 pgraph (& top_row -> expr -> root );
16091622#endif /*DEBUG*/
16101623 }
1624+
1625+ workspace_error_sanity (top_row -> ws );
16111626}
16121627
16131628static GSList *
0 commit comments