[retro-gtk] core-view-input-device: Don't log errors when 'view' is NULL
- From: Adrien Plazas <aplazas src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [retro-gtk] core-view-input-device: Don't log errors when 'view' is NULL
- Date: Fri, 8 Sep 2017 07:06:10 +0000 (UTC)
commit 540d7f608c72d72b6b1475f6cc9daec4ea7cc60b
Author: Adrien Plazas <kekun plazas laposte net>
Date: Fri Sep 8 09:02:22 2017 +0200
core-view-input-device: Don't log errors when 'view' is NULL
It is normal and expected from the view to become NULL, it shouldn't log
it as an error.
retro-gtk/retro-core-view-input-device.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/retro-gtk/retro-core-view-input-device.c b/retro-gtk/retro-core-view-input-device.c
index a1e903c..9017048 100644
--- a/retro-gtk/retro-core-view-input-device.c
+++ b/retro-gtk/retro-core-view-input-device.c
@@ -39,7 +39,8 @@ retro_core_view_input_device_get_input_state (RetroInputDevice *base,
view = g_weak_ref_get (&self->view);
- g_return_val_if_fail (view != NULL, 0);
+ if (view == NULL)
+ return 0;
result = retro_core_view_get_input_state (RETRO_CORE_VIEW (view),
self->device_type,
@@ -71,7 +72,8 @@ retro_core_view_input_device_get_device_capabilities (RetroInputDevice *base)
view = g_weak_ref_get (&self->view);
- g_return_val_if_fail (view != NULL, 0);
+ if (view == NULL)
+ return 0;
result = retro_core_view_get_device_capabilities (RETRO_CORE_VIEW (view));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]