if (!g_file_test(path, G_FILE_TEST_EXISTS))
part = g_strdup_printf("%s.part", path);
FILE *fp = fopen_p(part, "ab");
+ if (!fp) {
+ g_warning("GritsHttp: fetch - error opening %s", path);
+ return NULL;
+ }
fseek(fp, 0, SEEK_END); // "a" is broken on Windows, twice
/* Make temp data */
struct _LoadTileData *load = g_new0(struct _LoadTileData, 1);
load->path = grits_wms_fetch(elev->wms, tile, GRITS_ONCE, NULL, NULL);
+ if (!load->path) return; // Canceled/error
g_debug("GritsPluginElev: _load_tile: %s", load->path);
load->elev = elev;
load->tile = tile;