From 8739f846d091ffde0571c23d1f5b1190dc2ca90f Mon Sep 17 00:00:00 2001 From: Mason Larobina Date: Tue, 20 Jul 2010 12:41:32 +0800 Subject: [PATCH] Refactor to silence gcc uninit errors --- widgets/common.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/widgets/common.c b/widgets/common.c index da394d4..5dc4738 100644 --- a/widgets/common.c +++ b/widgets/common.c @@ -117,11 +117,12 @@ luaH_widget_get_child(lua_State *L) { widget_t *w = luaH_checkudata(L, 1, &widget_class); GtkWidget *widget = gtk_bin_get_child(GTK_BIN(w->widget)); + widget_t *child = NULL; if (!widget) return 0; - widget_t *child = g_object_get_data(G_OBJECT(child), "lua_widget"); + child = g_object_get_data(G_OBJECT(child), "lua_widget"); luaH_object_push(L, child->ref); return 1; } -- 2.11.4.GIT