From 80baf5aaa5d1e99ffc7993a178c47a86aad31d3c Mon Sep 17 00:00:00 2001 From: Luo Jinghua Date: Sun, 1 Nov 2009 19:44:30 +0800 Subject: milkway: get the *valid* source really --- milkway/mw-main-context.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/milkway/mw-main-context.c b/milkway/mw-main-context.c index d0c31bb..5de854a 100644 --- a/milkway/mw-main-context.c +++ b/milkway/mw-main-context.c @@ -222,6 +222,7 @@ mw_main_context_finalize (mw_object_t *super) if (context->cond != NULL) mw_cond_free (context->cond); + mw_object_unref(context->poll); MW_SUPER_FINALIZE(super, MW_MAIN_CONTEXT_TYPE)(super); } @@ -287,6 +288,7 @@ mw_main_context_init (mw_main_context_t *context) context->time_is_current = MW_FALSE; + context->poll = mw_poll_imp_new(NULL); mw_main_context_init_pipe (context); return context; @@ -559,7 +561,7 @@ next_valid_source (mw_main_context_t *context, mw_source_t *new_source = source ? source->next : context->source_list; while (new_source) { - if (!mw_source_is_active (new_source)) { + if (mw_source_is_active (new_source)) { mw_object_ref (new_source); break; } -- cgit v1.2.3