<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<p> Hello,</p>
<p><br>
</p>
<p> Is it normal that for this code</p>
<pre>int main() {
GDALAllRegister();
const char *pszFormat = "GTiff";
GDALDriver *driver = GetGDALDriverManager()->GetDriverByName(pszFormat);
if (driver == nullptr) {
printf("driver is null\n");
return 1;
}
std::string path = "sample.tif";
GDALAccess access = GA_ReadOnly;
GDALOpenInfo *open_info = new GDALOpenInfo(path.c_str(), access);
GDALDataset *ds = driver->pfnOpen(open_info);
printf("%p\n", ds->GetDriver());
printf("%s\n", ds->GetDriver()->GetDescription());
}</pre>
<p>I get ds->GetDriver = NULL (and a segfault on the following
line)? Tried on 3.1.2 and 3.1.0<br>
</p>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Momtchil Momtchev <a class="moz-txt-link-rfc2396E" href="mailto:momtchil@momtchev.com"><momtchil@momtchev.com></a>
</pre>
</body>
</html>