summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-23 00:17:02 +0100
committerDiego 'Flameeyes' Pettenò <flameeyes@gmail.com>2007-12-23 00:17:02 +0100
commit8c2667e55ec2e3fbd973be92013615c33134c9f9 (patch)
tree2aff2cfd0e7cee1e79f65bc2c530a3ba89f08bab /src
parent5cffb796e9a414e8effddb5f9f097c10d0b3f53f (diff)
downloadxine-lib-8c2667e55ec2e3fbd973be92013615c33134c9f9.tar.gz
xine-lib-8c2667e55ec2e3fbd973be92013615c33134c9f9.tar.bz2
Simplify code by returning immediately if the condition is not met.
Diffstat (limited to 'src')
-rw-r--r--src/spu_dec/cc_decoder.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/spu_dec/cc_decoder.c b/src/spu_dec/cc_decoder.c
index 49538ca66..c0e0e4930 100644
--- a/src/spu_dec/cc_decoder.c
+++ b/src/spu_dec/cc_decoder.c
@@ -932,11 +932,11 @@ static void cc_renderer_show_caption(cc_renderer_t *this, cc_buffer_t *buf,
static void cc_renderer_free_osd_object(cc_renderer_t *this)
{
/* hide and free old displayed caption object if necessary */
- if (this->cap_display) {
- cc_renderer_hide_caption(this, this->display_vpts);
- this->osd_renderer->free_object(this->cap_display);
- this->cap_display = NULL;
- }
+ if ( ! this->cap_display ) return;
+
+ cc_renderer_hide_caption(this, this->display_vpts);
+ this->osd_renderer->free_object(this->cap_display);
+ this->cap_display = NULL;
}