Browse Source

Merge branch 'ticket/45'

nextgen
rarified 3 years ago
parent
commit
19cfaaaea9
  1. 12
      Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.cpp

12
Sources/Plasma/PubUtilLib/plInputCore/plInputDevice.cpp

@ -481,8 +481,8 @@ void plMouseDevice::SetCursorY(hsScalar y)
void plMouseDevice::HideCursor(hsBool override) void plMouseDevice::HideCursor(hsBool override)
{ {
if( fInstance->fCursor != nil ) if (fInstance && fInstance->fCursor)
fInstance->fCursor->SetVisible( false ); fInstance->fCursor->SetVisible(false);
plMouseDevice::bCursorOverride = (override != 0); plMouseDevice::bCursorOverride = (override != 0);
plMouseDevice::bCursorHidden = true; plMouseDevice::bCursorHidden = true;
@ -499,9 +499,11 @@ void plMouseDevice::ShowCursor(hsBool override)
plMouseDevice::bCursorHidden = false; plMouseDevice::bCursorHidden = false;
plMouseDevice::bCursorOverride = false; plMouseDevice::bCursorOverride = false;
if( fInstance->fCursor == nil ) if (fInstance) {
fInstance->CreateCursor( fInstance->fCursorID ); if (!fInstance->fCursor)
fInstance->fCursor->SetVisible( true ); fInstance->CreateCursor(fInstance->fCursorID);
fInstance->fCursor->SetVisible(true);
}
} }
void plMouseDevice::NewCursor(char* cursor) void plMouseDevice::NewCursor(char* cursor)

Loading…
Cancel
Save