[libshumate] network-tile-source: Fix crash when cancellable is NULL
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libshumate] network-tile-source: Fix crash when cancellable is NULL
- Date: Thu, 25 Mar 2021 20:54:51 +0000 (UTC)
commit 757187617124ef1ac5af47107cdabebf81b51287
Author: James Westman <james jwestman net>
Date: Tue Mar 23 20:45:15 2021 -0500
network-tile-source: Fix crash when cancellable is NULL
shumate/shumate-network-tile-source.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/shumate/shumate-network-tile-source.c b/shumate/shumate-network-tile-source.c
index 5356b52..9377e8d 100644
--- a/shumate/shumate-network-tile-source.c
+++ b/shumate/shumate-network-tile-source.c
@@ -901,7 +901,8 @@ fill_tile (ShumateMapSource *map_source,
data = g_new0 (FillTileData, 1);
data->self = g_object_ref (tile_source);
data->tile = g_object_ref (tile);
- data->cancellable = g_object_ref (cancellable);
+ if (cancellable)
+ data->cancellable = g_object_ref (cancellable);
shumate_file_cache_get_tile_async (priv->file_cache, tile, cancellable, on_file_cache_get_tile, data);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]