diff --git a/libfreerdp/cache/cache.c b/libfreerdp/cache/cache.c index 8d2a6f1aa..0e42f6b6c 100644 --- a/libfreerdp/cache/cache.c +++ b/libfreerdp/cache/cache.c @@ -40,7 +40,7 @@ rdpCache* cache_new(rdpSettings* settings) if (!cache->glyph) goto error_glyph; cache->brush = brush_cache_new(settings); - if (cache->brush) + if (!cache->brush) goto error_brush; cache->pointer = pointer_cache_new(settings); if (!cache->pointer)