Check duplicate issues.
Description
If I create a new TGraph2D object with 0 points the new object is not properly initialized. The issue is that the TGraph2D::Build(n) function that is called by the constructors returns immediately if the number of points equals to zero. As a result the new TGraph2D object has most of its member attributes non-initialized and an attempt to use it (for example by calling SetDirectory() function) causes Segmentation Fault.
Reproducer
TGraph2D * g = new TGraph2d(0);
g->SetDirectory(0);
ROOT version
6.38.00
Installation method
CERN LCG_109 standard installation
Operating system
Alma 9 Linux
Additional context
No response
Check duplicate issues.
Description
If I create a new TGraph2D object with 0 points the new object is not properly initialized. The issue is that the TGraph2D::Build(n) function that is called by the constructors returns immediately if the number of points equals to zero. As a result the new TGraph2D object has most of its member attributes non-initialized and an attempt to use it (for example by calling SetDirectory() function) causes Segmentation Fault.
Reproducer
TGraph2D * g = new TGraph2d(0);
g->SetDirectory(0);
ROOT version
6.38.00
Installation method
CERN LCG_109 standard installation
Operating system
Alma 9 Linux
Additional context
No response