summaryrefslogtreecommitdiffstats
path: root/perl-install/standalone/draksplash
diff options
context:
space:
mode:
authorOlivier Blin <oblin@mandriva.org>2005-07-18 07:37:10 +0000
committerOlivier Blin <oblin@mandriva.org>2005-07-18 07:37:10 +0000
commit5e8dc9870b33434b474c99c0ded736bd39867d0f (patch)
tree78594c176a4908874f7f2a581f33eb8521025177 /perl-install/standalone/draksplash
parent34b1385bbadb59ed9aff2972e697aa03867cbec0 (diff)
downloaddrakx-5e8dc9870b33434b474c99c0ded736bd39867d0f.tar
drakx-5e8dc9870b33434b474c99c0ded736bd39867d0f.tar.gz
drakx-5e8dc9870b33434b474c99c0ded736bd39867d0f.tar.bz2
drakx-5e8dc9870b33434b474c99c0ded736bd39867d0f.tar.xz
drakx-5e8dc9870b33434b474c99c0ded736bd39867d0f.zip
do not die if loaded file isn't an image (#16829)
Diffstat (limited to 'perl-install/standalone/draksplash')
-rwxr-xr-xperl-install/standalone/draksplash6
1 files changed, 5 insertions, 1 deletions
diff --git a/perl-install/standalone/draksplash b/perl-install/standalone/draksplash
index 13dd89b22..71228c7a7 100755
--- a/perl-install/standalone/draksplash
+++ b/perl-install/standalone/draksplash
@@ -154,7 +154,11 @@ sub load_image {
$mode = 0;
@image_pixbuf = ();
}
- $image_pixbuf[$mode] = Gtk2::Gdk::Pixbuf->new_from_file($img);
+ eval { $image_pixbuf[$mode] = Gtk2::Gdk::Pixbuf->new_from_file($img) };
+ if ($@) {
+ $in->ask_warn(N("Error"), N("Unable to load image file %s", $img));
+ return;
+ }
$image_pixbuf[$mode] = $image_pixbuf[$mode]->scale_simple($theme{res_w}, $theme{res_h}, 'hyper');
$image_pixbuf[1-$mode] or $image_pixbuf[1-$mode] = $image_pixbuf[$mode];
$image_area->queue_draw;