- } else if (parent != NULL && strcmp (parent, "CoverageArea") == 0) {
- if (strcmp (element, "ZoomMin") == 0) {
- attribution->minZoom = atoi (textl);
- } else if (strcmp (element, "ZoomMax") == 0) {
- attribution->maxZoom = atoi (textl);
- }
- } else if (parent != NULL && strcmp (parent, "BoundingBox") == 0) {
- if (strcmp (element, "SouthLatitude") == 0) {
- attribution->bounds.south = g_ascii_strtod (textl, NULL);
- } else if (strcmp (element, "WestLongitude") == 0) {
- attribution->bounds.west = g_ascii_strtod (textl, NULL);
- } else if (strcmp (element, "NorthLatitude") == 0) {
- attribution->bounds.north = g_ascii_strtod (textl, NULL);
- } else if (strcmp (element, "EastLongitude") == 0) {
- attribution->bounds.east = g_ascii_strtod (textl, NULL);
+ }
+ else {
+ if ( attribution ) {
+ if (parent != NULL && strcmp (parent, "CoverageArea") == 0) {
+ if (strcmp (element, "ZoomMin") == 0) {
+ attribution->minZoom = atoi (textl);
+ } else if (strcmp (element, "ZoomMax") == 0) {
+ attribution->maxZoom = atoi (textl);
+ }
+ } else if (parent != NULL && strcmp (parent, "BoundingBox") == 0) {
+ if (strcmp (element, "SouthLatitude") == 0) {
+ attribution->bounds.south = g_ascii_strtod (textl, NULL);
+ } else if (strcmp (element, "WestLongitude") == 0) {
+ attribution->bounds.west = g_ascii_strtod (textl, NULL);
+ } else if (strcmp (element, "NorthLatitude") == 0) {
+ attribution->bounds.north = g_ascii_strtod (textl, NULL);
+ } else if (strcmp (element, "EastLongitude") == 0) {
+ attribution->bounds.east = g_ascii_strtod (textl, NULL);
+ }
+ }