summaryrefslogtreecommitdiff
path: root/desktop/unx/source/splashx.c
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2011-05-24 06:30:46 +0200
committerDavid Tardon <dtardon@redhat.com>2011-05-24 06:33:25 +0200
commit2daa098c3c1b49ce4d46306eddc45f7a66b7c021 (patch)
treea1bce59fc664c012791327990fd13794a2de04d6 /desktop/unx/source/splashx.c
parentdd051d725eff94873ed16ebcb16a7b7072f16069 (diff)
handle NULL display gracefully
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 a8a87b0adbdf..dc88343a8c65 100755
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -574,6 +574,9 @@ static void process_events()
// Draw the progress
void splash_draw_progress( int progress )
{
+ if (!display)
+ return;
+
// sanity
if ( progress < 0 )
progress = 0;
@@ -604,7 +607,8 @@ void splash_draw_progress( int progress )
// Close the window & cleanup
void splash_close_window()
{
- XCloseDisplay( display );
+ if (display)
+ XCloseDisplay( display );
#ifdef USE_LIBPNG
png_destroy_read_struct( &png_ptr, &info_ptr, NULL );
#else