Skip to content

Commit 1b81e94

Browse files
committed
fix(sedona-gdal): use last null pointer helper
1 parent 8010dab commit 1b81e94

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

c/sedona-gdal/src/vrt.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ use std::ptr::null_mut;
2323

2424
use crate::cpl::CslStringList;
2525
use crate::dataset::Dataset;
26-
use crate::errors::{GdalError, Result};
26+
use crate::errors::Result;
2727
use crate::gdal_api::{call_gdal_api, GdalApi};
2828
use crate::raster::rasterband::RasterBand;
2929
use crate::{gdal_dyn_bindgen::*, raster::types::GdalDataType};
@@ -47,10 +47,7 @@ impl VrtDataset {
4747
let c_dataset = unsafe { call_gdal_api!(api, VRTCreate, x, y) };
4848

4949
if c_dataset.is_null() {
50-
return Err(GdalError::NullPointer {
51-
method_name: "VRTCreate",
52-
msg: String::new(),
53-
});
50+
return Err(api.last_null_pointer_err("VRTCreate"));
5451
}
5552

5653
Ok(VrtDataset {

0 commit comments

Comments
 (0)