Fixed: Correct null pointer dereference
parent
8d82bf3338
commit
e3ebef0094
|
@ -1320,8 +1320,10 @@ int CDisplay::HandleTreeViewPopup2(WPARAM wParam,LPARAM lParam)
|
|||
{
|
||||
// need to remove the file name
|
||||
char* sz = strrchr(szFileName,'\\');
|
||||
if (!sz)sz = strrchr(szFileName,'/');
|
||||
if (!sz)*sz = 0;
|
||||
if (!sz)
|
||||
sz = strrchr(szFileName,'/');
|
||||
if (sz)
|
||||
*sz = 0;
|
||||
}
|
||||
OPENFILENAME sFilename1 = {
|
||||
sizeof(OPENFILENAME),
|
||||
|
@ -1353,8 +1355,10 @@ int CDisplay::HandleTreeViewPopup2(WPARAM wParam,LPARAM lParam)
|
|||
{
|
||||
// need to remove the file name
|
||||
char* sz = strrchr(szFileName,'\\');
|
||||
if (!sz)sz = strrchr(szFileName,'/');
|
||||
if (!sz)*sz = 0;
|
||||
if (!sz)
|
||||
sz = strrchr(szFileName,'/');
|
||||
if (sz)
|
||||
*sz = 0;
|
||||
}
|
||||
OPENFILENAME sFilename1 = {
|
||||
sizeof(OPENFILENAME),
|
||||
|
|
|
@ -168,8 +168,10 @@ void CLogWindow::Save()
|
|||
{
|
||||
// need to remove the file name
|
||||
char* sz = strrchr(szFileName,'\\');
|
||||
if (!sz)sz = strrchr(szFileName,'/');
|
||||
if (!sz)*sz = 0;
|
||||
if (!sz)
|
||||
sz = strrchr(szFileName,'/');
|
||||
if (sz)
|
||||
*sz = 0;
|
||||
}
|
||||
OPENFILENAME sFilename1 = {
|
||||
sizeof(OPENFILENAME),
|
||||
|
|
|
@ -474,8 +474,10 @@ void LoadBGTexture()
|
|||
{
|
||||
// need to remove the file name
|
||||
char* sz = strrchr(szFileName,'\\');
|
||||
if (!sz)sz = strrchr(szFileName,'/');
|
||||
if (!sz)*sz = 0;
|
||||
if (!sz)
|
||||
sz = strrchr(szFileName,'/');
|
||||
if (sz)
|
||||
*sz = 0;
|
||||
}
|
||||
OPENFILENAME sFilename1 = {
|
||||
sizeof(OPENFILENAME),
|
||||
|
@ -597,8 +599,10 @@ void LoadSkybox()
|
|||
{
|
||||
// need to remove the file name
|
||||
char* sz = strrchr(szFileName,'\\');
|
||||
if (!sz)sz = strrchr(szFileName,'/');
|
||||
if (!sz)*sz = 0;
|
||||
if (!sz)
|
||||
sz = strrchr(szFileName,'/');
|
||||
if (sz)
|
||||
*sz = 0;
|
||||
}
|
||||
OPENFILENAME sFilename1 = {
|
||||
sizeof(OPENFILENAME),
|
||||
|
@ -639,8 +643,10 @@ void SaveScreenshot()
|
|||
{
|
||||
// need to remove the file name
|
||||
char* sz = strrchr(szFileName,'\\');
|
||||
if (!sz)sz = strrchr(szFileName,'/');
|
||||
if (!sz)*sz = 0;
|
||||
if (!sz)
|
||||
sz = strrchr(szFileName,'/');
|
||||
if (sz)
|
||||
*sz = 0;
|
||||
}
|
||||
OPENFILENAME sFilename1 = {
|
||||
sizeof(OPENFILENAME),
|
||||
|
@ -938,8 +944,10 @@ void OpenAsset()
|
|||
{
|
||||
// need to remove the file name
|
||||
char* sz = strrchr(szFileName,'\\');
|
||||
if (!sz)sz = strrchr(szFileName,'/');
|
||||
if (!sz)*sz = 0;
|
||||
if (!sz)
|
||||
sz = strrchr(szFileName,'/');
|
||||
if (sz)
|
||||
*sz = 0;
|
||||
}
|
||||
|
||||
// get a list of all file extensions supported by ASSIMP
|
||||
|
|
Loading…
Reference in New Issue