[gnome-photos] application: Assert that it is a stateful GAction
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-photos] application: Assert that it is a stateful GAction
- Date: Fri, 12 May 2017 15:45:09 +0000 (UTC)
commit 4bd6b4c7b561054ff8643417582041d55f69bb6e
Author: Debarshi Ray <debarshir gnome org>
Date: Fri May 12 14:07:45 2017 +0200
application: Assert that it is a stateful GAction
src/photos-application.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)
---
diff --git a/src/photos-application.c b/src/photos-application.c
index 89b575d..95547e7 100644
--- a/src/photos-application.c
+++ b/src/photos-application.c
@@ -279,8 +279,7 @@ photos_application_action_toggle (GSimpleAction *simple, GVariant *parameter, gp
GVariant *new_state;
state = g_action_get_state (G_ACTION (simple));
- if (state == NULL)
- return;
+ g_return_if_fail (state != NULL);
new_state = g_variant_new ("b", !g_variant_get_boolean (state));
g_action_change_state (G_ACTION (simple), new_state);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]