summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorBastien Nocera <hadess@hadess.net>2007-09-26 11:52:08 +0000
committerBastien Nocera <hadess@src.gnome.org>2007-09-26 11:52:08 +0000
commit18292413a478805e72e4c178c41d4da6a8a8a6f2 (patch)
treee896c4a7c3cbdab2f43df6f41532cfce49500096 /lib
parent332ca82937f590d39316a5496273c73796b75e79 (diff)
downloadtotem-18292413a478805e72e4c178c41d4da6a8a8a6f2.tar.gz
Fix crash when there's no screensaver objects, and add assertion guards in
2007-09-26 Bastien Nocera <hadess@hadess.net> * browser-plugin/totem-plugin-viewer.c: (totem_embedded_set_state): * lib/totem-scrsaver.c: (totem_scrsaver_disable), (totem_scrsaver_enable), (totem_scrsaver_set_state): Fix crash when there's no screensaver objects, and add assertion guards in totem-scrsaver.c (Closes: #480558) svn path=/trunk/; revision=4735
Diffstat (limited to 'lib')
-rw-r--r--lib/totem-scrsaver.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/totem-scrsaver.c b/lib/totem-scrsaver.c
index 06d145a1b..a1ea44c5e 100644
--- a/lib/totem-scrsaver.c
+++ b/lib/totem-scrsaver.c
@@ -385,6 +385,8 @@ totem_scrsaver_init (TotemScrsaver *scr)
void
totem_scrsaver_disable (TotemScrsaver *scr)
{
+ g_return_if_fail (TOTEM_SCRSAVER (scr));
+
if (scr->priv->disabled != FALSE)
return;
@@ -404,6 +406,8 @@ totem_scrsaver_disable (TotemScrsaver *scr)
void
totem_scrsaver_enable (TotemScrsaver *scr)
{
+ g_return_if_fail (TOTEM_SCRSAVER (scr));
+
if (scr->priv->disabled == FALSE)
return;
@@ -423,6 +427,8 @@ totem_scrsaver_enable (TotemScrsaver *scr)
void
totem_scrsaver_set_state (TotemScrsaver *scr, gboolean enable)
{
+ g_return_if_fail (TOTEM_SCRSAVER (scr));
+
if (scr->priv->disabled == !enable)
return;