mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-16 05:45:33 +00:00
(really cyeh) fix crashing bug in optimized builds of viewer, but i'm really suprised that this didn't crash more often.
This commit is contained in:
parent
2e7efae0cd
commit
cb747fecb4
@ -1473,6 +1473,7 @@ nsresult nsRepository::AutoRegister(NSRegistrationInstant when,
|
||||
ProcessSerialNumber psn;
|
||||
ProcessInfoRec pInfo;
|
||||
FSSpec appFSSpec;
|
||||
FSSpec tempSpec;
|
||||
long theDirID;
|
||||
Str255 name;
|
||||
#endif
|
||||
@ -1486,6 +1487,9 @@ nsresult nsRepository::AutoRegister(NSRegistrationInstant when,
|
||||
// get info for the the current process to determine the directory its located in
|
||||
if (!(err = GetCurrentProcess(&psn)))
|
||||
{
|
||||
// initialize ProcessInfoRec before calling GetProcessInformation() or die horribly.
|
||||
pInfo.processName = nil;
|
||||
pInfo.processAppSpec = &tempSpec;
|
||||
if (!(err = GetProcessInformation(&psn, &pInfo)))
|
||||
{
|
||||
appFSSpec = *(pInfo.processAppSpec);
|
||||
|
@ -1473,6 +1473,7 @@ nsresult nsRepository::AutoRegister(NSRegistrationInstant when,
|
||||
ProcessSerialNumber psn;
|
||||
ProcessInfoRec pInfo;
|
||||
FSSpec appFSSpec;
|
||||
FSSpec tempSpec;
|
||||
long theDirID;
|
||||
Str255 name;
|
||||
#endif
|
||||
@ -1486,6 +1487,9 @@ nsresult nsRepository::AutoRegister(NSRegistrationInstant when,
|
||||
// get info for the the current process to determine the directory its located in
|
||||
if (!(err = GetCurrentProcess(&psn)))
|
||||
{
|
||||
// initialize ProcessInfoRec before calling GetProcessInformation() or die horribly.
|
||||
pInfo.processName = nil;
|
||||
pInfo.processAppSpec = &tempSpec;
|
||||
if (!(err = GetProcessInformation(&psn, &pInfo)))
|
||||
{
|
||||
appFSSpec = *(pInfo.processAppSpec);
|
||||
|
Loading…
x
Reference in New Issue
Block a user