projects
/
platform
/
upstream
/
freerdp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f219d34
)
gdi: fix nullification of instance->context->cache
author
Norbert Federa
<norbert.federa@thincast.com>
Thu, 14 May 2015 18:33:21 +0000
(20:33 +0200)
committer
Norbert Federa
<norbert.federa@thincast.com>
Thu, 14 May 2015 18:33:21 +0000
(20:33 +0200)
libfreerdp/gdi/gdi.c
patch
|
blob
|
history
diff --git
a/libfreerdp/gdi/gdi.c
b/libfreerdp/gdi/gdi.c
index
14430f4
..
976f1dc
100644
(file)
--- a/
libfreerdp/gdi/gdi.c
+++ b/
libfreerdp/gdi/gdi.c
@@
-1355,10
+1355,12
@@
BOOL gdi_init(freerdp* instance, UINT32 flags, BYTE* buffer)
goto fail_image_bitmap;
if (!instance->context->cache)
+ {
if (!(cache = cache_new(instance->settings)))
goto fail_cache;
- instance->context->cache = cache;
+ instance->context->cache = cache;
+ }
gdi_register_update_callbacks(instance->update);
@@
-1376,7
+1378,11
@@
BOOL gdi_init(freerdp* instance, UINT32 flags, BYTE* buffer)
return TRUE;
fail_register_graphics:
- free(cache);
+ if (cache)
+ {
+ instance->context->cache = NULL;
+ free(cache);
+ }
fail_cache:
gdi_bitmap_free_ex(gdi->image);
fail_image_bitmap: