[gpointing-device-settings] ignore unsupported devices.
- From: Hiroyuki Ikezoe <hiikezoe src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gpointing-device-settings] ignore unsupported devices.
- Date: Sun, 17 Jan 2010 04:11:46 +0000 (UTC)
commit 2a254272b523fb466acdf0419d5e288c805ba789
Author: Hiroyuki Ikezoe <poincare ikezoe net>
Date: Sun Jan 17 13:11:21 2010 +0900
ignore unsupported devices.
src/gpds-ui.c | 6 +++---
src/gpointing-device-settings.c | 2 ++
2 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/gpds-ui.c b/src/gpds-ui.c
index 7be5672..772302f 100644
--- a/src/gpds-ui.c
+++ b/src/gpds-ui.c
@@ -184,10 +184,10 @@ gpds_ui_new (const gchar *name, const gchar *first_property, ...)
va_list var_args;
module = gpds_module_find(uis, name);
- if (!module)
- {
+ if (!module) {
module = gpds_module_load_module(gpds_module_directory(), name);
- g_return_val_if_fail(module != NULL, NULL);
+ if (!module)
+ return NULL;
uis = g_list_prepend(uis, module);
}
diff --git a/src/gpointing-device-settings.c b/src/gpointing-device-settings.c
index 98b5989..c3f3c3f 100644
--- a/src/gpointing-device-settings.c
+++ b/src/gpointing-device-settings.c
@@ -77,6 +77,8 @@ create_ui_from_pointer_info (GpdsXInputPointerInfo *info)
"device-name", device_name,
NULL);
g_free(type_name);
+ if (!ui)
+ return NULL;
if (!gpds_ui_is_available(ui, &error)) {
if (error) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]