Fixed a backwards ‘if’ test, and memory leak

The test was very likely backwards, and anyway unneeded,
as it’s safe to pass null to delete.

Change-Id: I8d54af9a3fe5d168e5ef17e799ffc2c42508d517
Eliminated unneeded null checks before using delete/free

Change-Id: I76fea205f42b796bcfc5d47b6f171d39eadd44a4
Fixed indentation level

Change-Id: I714c2ba7f53d434b925a8a9c30969ac64b89b628
Fixed ‘null deref’ warning

Check for null then bail early.

Change-Id: Ie92850bd183e620da1e7e6f69c5635f56082caf7
Simplified memory deallocation

Removed if-else checks before deleting.
The pointers are either null or valid, so unconditional delete is fine.

Change-Id: I3f390ecb1a689dac67b04c5f1fe21d221ff0e310
Removed useless assignment

Furthermore, removed useless variable.

Change-Id: Ifd2218181a34d25917fd907ac1be4bdde665adf1
Fixed warning about using null with memcpy

Just reformulated things a bit.

Change-Id: I11f7c8204a578f52bc7d096e582a36b86af84dd6
Removed useless assignments

Change-Id: I31ee444e4b453073e231b4d28cf1693989c4794e
Misc cleanup and refactoring

-Use bool instead of int.
-Move declarations and initial definitions together

Change-Id: I4874984b7f76b141cd3d1f8078b536c129dcc136
FIX: Remove all vtkgl dependencies for vtkRenderingVolumeOpenGLNew

Change-Id: I02b65ea5cd10e8e10df0408a45f7c3eb2a1344ed
Merge topic 'clang-static-analyzer-fixes' into master

5372604a Misc cleanup and refactoring
ddccb71f Removed useless assignments
83a5945a Fixed warning about using null with memcpy
6ddb0bb3 Removed useless assignment
775ea71f Simplified memory deallocation
b417e826 Fixed ‘null deref’ warning
a3a2ed93 Fixed indentation level
Merge topic 'unneeded-delete-checks' into master

de54031e Eliminated unneeded null checks before using delete/free
fe69c242 Fixed a backwards ‘if’ test, and memory leak
Merge topic 'remove_vtkgl_dependency' into master

9e57befb FIX: Remove all vtkgl dependencies for vtkRenderingVolumeOpenGLNew