commit 52fc847f2965be411d0574a75017962cd17f4876
parent a016da5d96ce5642ba94216f56061d842bd23247
Author: Andrej Kacian <ticho@local>
Date: Wed, 16 Jan 2019 18:36:55 +0100
Fix crash when LDAP address source is defined in index, but LDAP support is disabled
AddressIfFrag is being cast to AddrBookBase, so it too
needs to have the two mandatory members at the beginning.
Diffstat:
1 file changed, 4 insertions(+), 0 deletions(-)
diff --git a/src/addrindex.c b/src/addrindex.c
@@ -162,6 +162,8 @@ static gint addrindex_write_to ( AddressIndex *addrIndex,
*/
typedef struct _AddressIfFrag AddressIfFragment;
struct _AddressIfFrag {
+ AddressBookType type;
+ AddressCache *addressCache;
gchar *name;
GList *children;
GList *attributes;
@@ -1013,6 +1015,8 @@ static AddressIfFragment *addrindex_read_fragment( XMLFile *file ) {
/* Create new fragment */
fragment = g_new0( AddressIfFragment, 1 );
+ fragment->type = ADBOOKTYPE_NONE;
+ fragment->addressCache = NULL;
fragment->name = g_strdup( xtag->tag );
fragment->children = NULL;
fragment->attributes = NULL;