commit 562f0293a833cbef00db1f8e87886acc2ff170c4
parent 831126c3a1b3bd63e740bfb8ef1171220fbc6e3e
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;