Browse Source

Fixed variable assignment values.

Marcel Metz 13 years ago
parent
commit
c6297ec333

+ 2 - 2
tools/assimp_view/Display.cpp

@@ -1183,7 +1183,7 @@ int CDisplay::HandleTreeViewPopup(WPARAM wParam,LPARAM lParam)
 {
 	// get the current selected material
 	std::vector<Info> apclrOut;
-	const char* szMatKey;
+	const char* szMatKey = "";
 
 	switch (LOWORD(wParam))
 	{
@@ -1251,7 +1251,7 @@ int CDisplay::HandleTreeViewPopup(WPARAM wParam,LPARAM lParam)
 		clr.lpCustColors = g_aclCustomColors;
 		clr.lpfnHook = NULL;
 		clr.lpTemplateName = NULL;
-		clr.lCustData = NULL;
+		clr.lCustData = 0;
 
 		ChooseColor(&clr);
 

+ 1 - 1
tools/assimp_view/MeshRenderer.cpp

@@ -61,7 +61,7 @@ int CMeshRenderer::DrawUnsorted(unsigned int iIndex)
 
 	g_piDevice->SetIndices(g_pcAsset->apcMeshes[iIndex]->piIB);
 
-	D3DPRIMITIVETYPE type;
+	D3DPRIMITIVETYPE type = D3DPT_POINTLIST;
 	switch (g_pcAsset->pcScene->mMeshes[iIndex]->mPrimitiveTypes) {
 		case aiPrimitiveType_POINT:
 			type = D3DPT_POINTLIST;break;

+ 2 - 2
tools/assimp_view/MessageProc.cpp

@@ -522,7 +522,7 @@ void DisplayColorDialog(D3DCOLOR* pclrResult)
 	clr.lpCustColors = g_aclCustomColors;
 	clr.lpfnHook = NULL;
 	clr.lpTemplateName = NULL;
-	clr.lCustData = NULL;
+	clr.lCustData = 0;
 
 	ChooseColor(&clr);
 
@@ -549,7 +549,7 @@ void DisplayColorDialog(D3DXVECTOR4* pclrResult)
 	clr.lpCustColors = g_aclCustomColors;
 	clr.lpfnHook = NULL;
 	clr.lpTemplateName = NULL;
-	clr.lCustData = NULL;
+	clr.lCustData = 0;
 
 	ChooseColor(&clr);