mirror of
https://github.com/Rafostar/clapper.git
synced 2025-08-29 15:22:11 +02:00
clapper-gtk: video: Fix checks when inhibiting session
This commit is contained in:
@@ -909,7 +909,7 @@ _set_inhibit_session (ClapperGtkVideo *self, gboolean inhibit)
|
||||
|
||||
root = gtk_widget_get_root (GTK_WIDGET (self));
|
||||
|
||||
if (!root && !GTK_IS_WINDOW (root)) {
|
||||
if (!root || !GTK_IS_WINDOW (root)) {
|
||||
GST_WARNING_OBJECT (self, "Cannot %sinhibit session "
|
||||
"without root window", (inhibit) ? "" : "un");
|
||||
return;
|
||||
@@ -919,7 +919,7 @@ _set_inhibit_session (ClapperGtkVideo *self, gboolean inhibit)
|
||||
* as it goes away early when unrooting */
|
||||
app = g_application_get_default ();
|
||||
|
||||
if (!app && !GTK_IS_APPLICATION (app)) {
|
||||
if (!app || !GTK_IS_APPLICATION (app)) {
|
||||
GST_WARNING_OBJECT (self, "Cannot %sinhibit session "
|
||||
"without window application set", (inhibit) ? "" : "un");
|
||||
return;
|
||||
|
Reference in New Issue
Block a user