0c13f98fe1
unfinished ui...
32 lines
1.2 KiB
Diff
32 lines
1.2 KiB
Diff
Prevent greeter from crashing if background can't be loaded
|
|
In Fedora 8 we default to animated backgrounds, and
|
|
the simple greeter doesn't understand that format. This exposed
|
|
a crasher bug in the simple greter where it assumed background
|
|
loading would always succeed.
|
|
|
|
As a side note, the greeter should probably use libbackground
|
|
(or is it libgnome-desktop?) to draw the background, so it can
|
|
do animated backgrounds, too.
|
|
|
|
--- gdm-2.99.0/gui/simple-greeter/gdm-greeter-background.c.fix-crash-on-background-load-failure
|
|
+++ gdm-2.99.0/gui/simple-greeter/gdm-greeter-background.c
|
|
@@ -481,6 +481,10 @@ update_background (GdmGreeterBackground *background)
|
|
|
|
if (background->priv->pat == NULL) {
|
|
load_image (background);
|
|
+
|
|
+ if (background->priv->pat == NULL)
|
|
+ goto out;
|
|
+
|
|
}
|
|
|
|
if (background->priv->image_placement == BACKGROUND_SCALED) {
|
|
@@ -582,6 +586,7 @@ update_background (GdmGreeterBackground *background)
|
|
cairo_fill (cr);
|
|
}
|
|
|
|
+out:
|
|
cairo_destroy (cr);
|
|
}
|
|
|