diff options
author | Luo Jinghua <sunmoon1997@gmail.com> | 2009-11-01 19:44:30 +0800 |
---|---|---|
committer | Luo Jinghua <sunmoon1997@gmail.com> | 2009-11-01 19:44:30 +0800 |
commit | 80baf5aaa5d1e99ffc7993a178c47a86aad31d3c (patch) | |
tree | a04f3848e592480d1bdac59d1b0424f888e4c2f4 | |
parent | d51cc574138184f0f4666538f9f4dab37c48814d (diff) |
milkway: get the *valid* source really
-rw-r--r-- | milkway/mw-main-context.c | 4 |
1 files changed, 3 insertions, 1 deletions
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; } |