We should not crash, only because we couldn't hide the cursor.

git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14744 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
al 2005-02-20 22:58:55 +00:00
parent f366d01286
commit 471f9a844f
1 changed files with 4 additions and 1 deletions

View File

@ -176,7 +176,10 @@ void vo_hidecursor(Display * disp, Window win)
return; // do not hide, if we're playing at rootwin return; // do not hide, if we're playing at rootwin
colormap = DefaultColormap(disp, DefaultScreen(disp)); colormap = DefaultColormap(disp, DefaultScreen(disp));
XAllocNamedColor(disp, colormap, "black", &black, &dummy); if ( !XAllocNamedColor(disp, colormap, "black", &black, &dummy) )
{
return; // color alloc failed, give up
}
bm_no = XCreateBitmapFromData(disp, win, bm_no_data, 8, 8); bm_no = XCreateBitmapFromData(disp, win, bm_no_data, 8, 8);
no_ptr = XCreatePixmapCursor(disp, bm_no, bm_no, &black, &black, 0, 0); no_ptr = XCreatePixmapCursor(disp, bm_no, bm_no, &black, &black, 0, 0);
XDefineCursor(disp, win, no_ptr); XDefineCursor(disp, win, no_ptr);