[vlc-commits] kate: do not access the renderer if it fails to initialize

Vincent Penquerc'h git at videolan.org
Thu Oct 6 01:17:37 CEST 2011


vlc | branch: master | Vincent Penquerc'h <ogg.k.ogg.k at googlemail.com> | Wed Oct  5 22:07:50 2011 +0100| [7ecb5c155a0e2d344e075f6f8fd5f1c7ac4eeb08] | committer: Jean-Baptiste Kempf

kate: do not access the renderer if it fails to initialize

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=7ecb5c155a0e2d344e075f6f8fd5f1c7ac4eeb08
---

 modules/codec/kate.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/modules/codec/kate.c b/modules/codec/kate.c
index 49177da..769e0d9 100644
--- a/modules/codec/kate.c
+++ b/modules/codec/kate.c
@@ -404,14 +404,15 @@ static int OpenDecoder( vlc_object_t *p_this )
             p_sys->p_tr = NULL;
             p_sys->b_use_tiger = false;
         }
-
-        CHECK_TIGER_RET( tiger_renderer_set_surface_clear_color( p_sys->p_tr, 1, 0, 0, 0, 0 ) );
-
-        UpdateTigerFontEffect( p_dec );
-        UpdateTigerFontColor( p_dec );
-        UpdateTigerBackgroundColor( p_dec );
-        UpdateTigerQuality( p_dec );
-        UpdateTigerFontDesc( p_dec );
+        else {
+            CHECK_TIGER_RET( tiger_renderer_set_surface_clear_color( p_sys->p_tr, 1, 0, 0, 0, 0 ) );
+
+            UpdateTigerFontEffect( p_dec );
+            UpdateTigerFontColor( p_dec );
+            UpdateTigerBackgroundColor( p_dec );
+            UpdateTigerQuality( p_dec );
+            UpdateTigerFontDesc( p_dec );
+        }
     }
 
 #else



More information about the vlc-commits mailing list