From 45973084b27f4540ecc9a19117cad9bf9230bdc5 Mon Sep 17 00:00:00 2001 From: laforge Date: Thu, 3 Jul 2008 16:23:41 +0000 Subject: * fix segfault with generic machine plugin (by Jamal Selim) the generic machine plugin doesn't have initsettings, therefore we cannot blindly assume it exists. git-svn-id: http://svn.openmoko.org/trunk/src/target/gsm@4505 99fdad57-331a-0410-800a-d7fa5415bdb3 --- src/gsmd/gsmd.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/gsmd/gsmd.c b/src/gsmd/gsmd.c index 44dac60..58d92e3 100644 --- a/src/gsmd/gsmd.c +++ b/src/gsmd/gsmd.c @@ -198,7 +198,8 @@ static int gsmd_initsettings2(struct gsmd *gsmd) if (gsmd->vendorpl && gsmd->vendorpl->initsettings){ rc |= gsmd->vendorpl->initsettings(gsmd); - rc |= gsmd->machinepl->initsettings(gsmd); + if (gsmd->machinepl && gsmd->machinepl->initsettings) + rc |= gsmd->machinepl->initsettings(gsmd); return rc; } else -- cgit v1.2.3