fix g_gc memleak
git-svn-id: svn://svn.code.sf.net/p/rdesktop/code/trunk/rdesktop@565 423420c4-83ab-492f-b58f-81f9feb106b5
This commit is contained in:
parent
0f1660ead7
commit
899e56c108
7
xwin.c
7
xwin.c
@ -43,6 +43,7 @@ static Screen *g_screen;
|
|||||||
Window g_wnd;
|
Window g_wnd;
|
||||||
BOOL g_enable_compose = False;
|
BOOL g_enable_compose = False;
|
||||||
static GC g_gc;
|
static GC g_gc;
|
||||||
|
static BOOL g_gc_initialized = False;
|
||||||
static Visual *g_visual;
|
static Visual *g_visual;
|
||||||
static int g_depth;
|
static int g_depth;
|
||||||
static int g_bpp;
|
static int g_bpp;
|
||||||
@ -887,7 +888,11 @@ ui_create_window(void)
|
|||||||
CWBackPixel | CWBackingStore | CWOverrideRedirect |
|
CWBackPixel | CWBackingStore | CWOverrideRedirect |
|
||||||
CWColormap | CWBorderPixel, &attribs);
|
CWColormap | CWBorderPixel, &attribs);
|
||||||
|
|
||||||
g_gc = XCreateGC(g_display, g_wnd, 0, NULL);
|
if ( ! g_gc_initialized )
|
||||||
|
{
|
||||||
|
g_gc = XCreateGC(g_display, g_wnd, 0, NULL);
|
||||||
|
g_gc_initialized = True;
|
||||||
|
}
|
||||||
|
|
||||||
if ((g_ownbackstore) && (! g_backstore_initialized))
|
if ((g_ownbackstore) && (! g_backstore_initialized))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user