[Xfce4-commits] <xfce4-xkb-plugin:4.10_panel_support> Replace g_assert with g_warning. Bug 10128.
Igor Slepchin
noreply at xfce.org
Tue Jun 18 00:44:01 CEST 2013
Updating branch refs/heads/4.10_panel_support
to 7064d0473144a5eac3c8939893e93e1fe16bb77c (commit)
from f26301839e73061b97f18830af75eefc66b25646 (commit)
commit 7064d0473144a5eac3c8939893e93e1fe16bb77c
Author: Igor Slepchin <igor.slepchin at gmail.com>
Date: Mon Jun 17 14:16:59 2013 -0400
Replace g_assert with g_warning. Bug 10128.
panel-plugin/xkb-config.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/panel-plugin/xkb-config.c b/panel-plugin/xkb-config.c
index 27fe3ab..f2ceda1 100644
--- a/panel-plugin/xkb-config.c
+++ b/panel-plugin/xkb-config.c
@@ -260,12 +260,15 @@ static gint
xkb_config_get_current_group (void)
{
XklState* state = xkl_engine_get_current_state (config->engine);
- g_assert(state->group >= 0 && state->group < config->group_count);
if (G_LIKELY (state->group >= 0 && state->group < config->group_count))
return state->group;
else
+ {
+ g_warning ("Invalid group number: %d; group_count=%d",
+ state->group, config->group_count);
return 0;
+ }
}
gboolean
More information about the Xfce4-commits
mailing list