mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-05-16 18:17:15 +02:00
19 lines
641 B
Diff
19 lines
641 B
Diff
diff --git a/Utilities/VTK/vtkGDCMImageReader2.cxx b/Utilities/VTK/vtkGDCMImageReader2.cxx
|
|
index 4976f0190..db0fa4d30 100644
|
|
--- a/Utilities/VTK/vtkGDCMImageReader2.cxx
|
|
+++ b/Utilities/VTK/vtkGDCMImageReader2.cxx
|
|
@@ -891,7 +891,12 @@ int vtkGDCMImageReader2::LoadSingleFile(const char *filename, char *pointer, uns
|
|
char * copy = new char[len];
|
|
/*image.GetBuffer(copy);*/
|
|
bool b = reader.ReadIntoBuffer(copy, len);
|
|
- assert( b );
|
|
+ if( !b )
|
|
+ {
|
|
+ delete[] copy;
|
|
+ vtkErrorMacro( "Could not ReadIntoBuffer" );
|
|
+ return 0;
|
|
+ }
|
|
if( !r.Rescale(pointer,copy,len) )
|
|
{
|
|
delete[] copy;
|