aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-06-19 18:48:26 -0400
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-06-19 18:48:26 -0400
commit5aca3b41fcc08855e8bb017abe755abece85c5fa (patch)
treea4458d57d2519dbf69969a73c0367029e1c95df8 /src
parente2de4823d11d0c2fc4479e0bc0ad8955d9962255 (diff)
downloadayatana-ido-5aca3b41fcc08855e8bb017abe755abece85c5fa.tar.gz
ayatana-ido-5aca3b41fcc08855e8bb017abe755abece85c5fa.tar.bz2
ayatana-ido-5aca3b41fcc08855e8bb017abe755abece85c5fa.zip
idoplaybackmenuitem: warn before crashing in g_str_equal
Diffstat (limited to 'src')
-rw-r--r--src/idoplaybackmenuitem.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/idoplaybackmenuitem.c b/src/idoplaybackmenuitem.c
index 81fcab7..e520e20 100644
--- a/src/idoplaybackmenuitem.c
+++ b/src/idoplaybackmenuitem.c
@@ -331,6 +331,8 @@ static void
ido_playback_menu_item_set_state_from_string (IdoPlaybackMenuItem *self,
const gchar *state)
{
+ g_return_if_fail (state != NULL);
+
if (g_str_equal (state, "Playing"))
self->current_state = STATE_PLAYING;
else if (g_str_equal (state, "Launching"))
@@ -382,6 +384,8 @@ ido_playback_menu_item_action_state_changed (GActionGroup *action_group,
{
IdoPlaybackMenuItem *self = user_data;
+ g_return_if_fail (action_name != NULL);
+
if (self->play_action && g_str_equal (action_name, self->play_action))
{
if (g_variant_is_of_type (value, G_VARIANT_TYPE_STRING))