summaryrefslogtreecommitdiff
path: root/desktop/unx/source/splashx.c
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/unx/source/splashx.c')
-rwxr-xr-xdesktop/unx/source/splashx.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index 4f5d4b217a..e975733e15 100755
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -589,6 +589,9 @@ static void process_events()
// Draw the progress
void splash_draw_progress( int progress )
{
+ if (!display)
+ return;
+
// sanity
if ( progress < 0 )
progress = 0;
@@ -619,7 +622,8 @@ void splash_draw_progress( int progress )
// Close the window & cleanup
void splash_close_window()
{
- XCloseDisplay( display );
+ if (display)
+ XCloseDisplay( display );
display = NULL;
#ifdef USE_LIBPNG
png_destroy_read_struct( &png_ptr, &info_ptr, NULL );