widget: Only warn about missing allocation if G_ENABLE_DEBUG

Not all occurrences of this warning can be fixed today, so put it behind
a G_ENABLE_DEBUG flag since it still shows legitimate problems even if
some of them are false positives.
This commit is contained in:
Timm Bäder 2016-09-14 18:06:54 -04:00 committed by Matthias Clasen
parent 108a4f88bf
commit 5ea69a136b

View File

@ -6998,8 +6998,10 @@ gtk_widget_draw_internal (GtkWidget *widget,
if (push_group)
cairo_push_group (cr);
#ifdef G_ENABLE_DEBUG
if (_gtk_widget_get_alloc_needed (widget))
g_warning ("%s %p is drawn without a current allocation. This should not happen.", G_OBJECT_TYPE_NAME (widget), widget);
#endif
if (g_signal_has_handler_pending (widget, widget_signals[DRAW], 0, FALSE))
{