Revision: 4663
http://planeshift.svn.sourceforge.net/planeshift/?rev=4663&view=rev
Author: kennygraunke
Date: 2009-10-20 03:02:42 +0000 (Tue, 20 Oct 2009)
Log Message:
-----------
Check validity before setting the OS mouse.
Excerpt from a patch by Khaki, rebased to current trunk by me.
Modified Paths:
--------------
trunk/src/common/paws/pawsmouse.cpp
Modified: trunk/src/common/paws/pawsmouse.cpp
===================================================================
--- trunk/src/common/paws/pawsmouse.cpp 2009-10-20 03:02:34 UTC (rev 4662)
+++ trunk/src/common/paws/pawsmouse.cpp 2009-10-20 03:02:42 UTC (rev 4663)
@@ -67,12 +67,12 @@
void pawsMouse::ChangeImage( const char* imageName )
{
cursorImage = PawsManager::GetSingleton().GetTextureManager()->GetPawsImage(imageName);
+ if (!cursorImage.IsValid())
+ {
+ printf("Fatal error: Can't find cursor '%s'!", imageName);
+ exit(1);
+ }
SetOSMouse(cursorImage);
- if (!cursorImage.IsValid())
- {
- printf("Fatal error: Can't find cursor '%s'!", imageName);
- exit(1);
- }
}
void pawsMouse::ChangeImage(csRef<iPawsImage> drawable)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|