summaryrefslogtreecommitdiff
path: root/desktop/unx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2020-04-14 16:10:40 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2020-04-14 20:46:19 +0200
commitbc66bf4608557d757555aef1f46abf8a15c3538b (patch)
tree92d1f64c49ad464c26cb33b0044fdf54efa7cdf5 /desktop/unx
parentd72f963c0de0c2e48f1dc999cd8687e13a1f676f (diff)
loplugin:flatten in desktop
Change-Id: I1ab39e041025692cac06eb6602787f16a3a9cb0c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92198 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'desktop/unx')
-rw-r--r--desktop/unx/source/splashx.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index d759ed3a4816..afd137d06876 100644
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -727,22 +727,22 @@ void splash_draw_progress( struct splash* splash, int progress )
void splash_destroy(struct splash* splash)
{
- if(splash)
+ if(!splash)
+ return;
+
+ if(splash->display)
{
- if(splash->display)
+ if(splash->gc)
{
- if(splash->gc)
- {
- XFreeGC(splash->display, splash->gc);
- splash->gc = NULL;
- }
-
- XCloseDisplay( splash->display );
- splash->display = NULL;
- png_destroy_read_struct( &(splash->png_ptr), &(splash->info_ptr), NULL );
+ XFreeGC(splash->display, splash->gc);
+ splash->gc = NULL;
}
- free(splash);
+
+ XCloseDisplay( splash->display );
+ splash->display = NULL;
+ png_destroy_read_struct( &(splash->png_ptr), &(splash->info_ptr), NULL );
}
+ free(splash);
}
struct splash* splash_create(rtl_uString* pAppPath, int argc, char** argv)