# HG changeset patch
# User Dan Smith <danms(a)us.ibm.com>
# Date 1226613004 28800
# Node ID ce7c7e1b1779e43176254108c271ab1e9501390f
# Parent 9ff301e463a4de21ffae06ce58442da24e40c6cb
Handle failure to instantiate Foo_PointingDevice
Without this, we segfault the provider if the schema hasn't been installed
for PointingDevice.
Signed-off-by: Dan Smith <danms(a)us.ibm.com>
diff -r 9ff301e463a4 -r ce7c7e1b1779 src/Virt_Device.c
--- a/src/Virt_Device.c Wed Nov 12 14:22:50 2008 -0800
+++ b/src/Virt_Device.c Thu Nov 13 13:50:04 2008 -0800
@@ -289,6 +289,11 @@
pfx_from_conn(conn),
"PointingDevice",
ns);
+ if (inst == NULL) {
+ CU_DEBUG("Failed to get instance of %s_PointingDevice",
+ pfx_from_conn(conn));
+ return NULL;
+ }
if (!input_set_attr(inst, dev))
return NULL;