mirror of
https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git
synced 2025-07-14 02:27:40 -04:00
Fix crash from plMouseDevice::HideCursor if it is called before cursor is created
This commit is contained in:
@ -481,8 +481,8 @@ void plMouseDevice::SetCursorY(hsScalar y)
|
||||
|
||||
void plMouseDevice::HideCursor(hsBool override)
|
||||
{
|
||||
if( fInstance->fCursor != nil )
|
||||
fInstance->fCursor->SetVisible( false );
|
||||
if (fInstance && fInstance->fCursor)
|
||||
fInstance->fCursor->SetVisible(false);
|
||||
|
||||
plMouseDevice::bCursorOverride = (override != 0);
|
||||
plMouseDevice::bCursorHidden = true;
|
||||
@ -499,9 +499,11 @@ void plMouseDevice::ShowCursor(hsBool override)
|
||||
plMouseDevice::bCursorHidden = false;
|
||||
plMouseDevice::bCursorOverride = false;
|
||||
|
||||
if( fInstance->fCursor == nil )
|
||||
fInstance->CreateCursor( fInstance->fCursorID );
|
||||
fInstance->fCursor->SetVisible( true );
|
||||
if (fInstance) {
|
||||
if (!fInstance->fCursor)
|
||||
fInstance->CreateCursor(fInstance->fCursorID);
|
||||
fInstance->fCursor->SetVisible(true);
|
||||
}
|
||||
}
|
||||
|
||||
void plMouseDevice::NewCursor(char* cursor)
|
||||
|
Reference in New Issue
Block a user