diff --git a/demo/addons/geodot/geodot.gd b/demo/addons/geodot/geodot.gd index e086a49..b1c5039 100644 --- a/demo/addons/geodot/geodot.gd +++ b/demo/addons/geodot/geodot.gd @@ -3,6 +3,9 @@ extends Node static func get_dataset(path: String, write_access=false) -> GeoDataset: + if not FileAccess.file_exists(path): + push_error("Trying to load non existent file at '%s'" % [path]) + var dataset := GeoDataset.new() dataset.load_from_file(path, write_access) @@ -10,6 +13,9 @@ static func get_dataset(path: String, write_access=false) -> GeoDataset: static func get_raster_layer(path: String, write_access=false) -> GeoRasterLayer: + if not FileAccess.file_exists(path): + push_error("Trying to load non existent file at '%s'" % [path]) + var layer := GeoRasterLayer.new() layer.load_from_file(path, write_access)