[retro-gtk] environment: Log a critical when getting a variable failed
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] environment: Log a critical when getting a variable failed
- Date: Sat, 19 Dec 2020 08:15:56 +0000 (UTC)
commit 39ad15bd5a298b85cd3ad9597411a1cbd765ceed
Author: Adrien Plazas <kekun plazas laposte net>
Date: Thu Dec 17 19:29:29 2020 +0100
environment: Log a critical when getting a variable failed
retro-runner/retro-environment.c | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/retro-runner/retro-environment.c b/retro-runner/retro-environment.c
index d2ba2a0..167db52 100644
--- a/retro-runner/retro-environment.c
+++ b/retro-runner/retro-environment.c
@@ -285,8 +285,11 @@ get_variable (RetroCore *self,
value = g_hash_table_lookup (self->variables, variable->key);
- if (!value)
+ if (G_UNLIKELY (!value)) {
+ g_critical ("Couldn't get variable %s", variable->key);
+
return FALSE;
+ }
variable->value = value;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]