Skip to content

Commit 850491a

Browse files
committed
Fix crash on uninitialized variables
1 parent 119936c commit 850491a

2 files changed

Lines changed: 8 additions & 5 deletions

File tree

Libs/VTK/Widgets/msvVTKButtonsInterface.cxx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,8 @@ vtkStandardNewMacro(msvVTKButtonsInterface);
3838
//----------------------------------------------------------------------
3939
msvVTKButtonsInterface::msvVTKButtonsInterface()
4040
{
41+
this->ButtonCallback = NULL;
42+
this->HighlightCallback = NULL;
4143
this->LabelText=NULL;
4244
this->Tooltip=NULL;
4345
this->ShowButton=true;

Libs/VTK/Widgets/msvVTKWidgetClusters.cxx

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -773,11 +773,6 @@ vtkInformationKeyRestrictedMacro(msvVTKWidgetClusters, CLUSTER_BUTTONS_OFFSET,
773773
// ------------------------------------------------------------------------------
774774
msvVTKWidgetClusters::msvVTKWidgetClusters()
775775
{
776-
this->Internal = new vtkInternal(this);
777-
this->ColorLookUpTable = vtkLookupTable::New();
778-
this->ColorLookUpTable->SetNumberOfColors(5);
779-
this->ColorLookUpTable->Build();
780-
781776
this->UseImprovedClustering = true;
782777
this->Clustering = true;
783778
this->ButtonWidgetSize = 3,
@@ -786,6 +781,12 @@ msvVTKWidgetClusters::msvVTKWidgetClusters()
786781
this->ShiftWidgetCenterToCorner = false;
787782
this->ClusteringWithinGroups = false;
788783
this->UsePlainVTKButtons = true;
784+
785+
this->Internal = new vtkInternal(this);
786+
this->ColorLookUpTable = vtkLookupTable::New();
787+
this->ColorLookUpTable->SetNumberOfColors(5);
788+
this->ColorLookUpTable->Build();
789+
this->ButtonIcon = 0;
789790
}
790791

791792
// ------------------------------------------------------------------------------

0 commit comments

Comments
 (0)