[libhandy/swipe-tracker-public: 16/16] swipe-tracker: Make checks in _new() more robust
- From: Alexander Mikhaylenko <alexm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libhandy/swipe-tracker-public: 16/16] swipe-tracker: Make checks in _new() more robust
- Date: Sun, 14 Jun 2020 20:45:55 +0000 (UTC)
commit bef7887020e32cd0d7abf2cca91ee8dced78df64
Author: Alexander Mikhaylenko <alexm gnome org>
Date: Mon Jun 15 01:43:52 2020 +0500
swipe-tracker: Make checks in _new() more robust
Signed-off-by: Alexander Mikhaylenko <alexm gnome org>
src/hdy-swipe-tracker.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/hdy-swipe-tracker.c b/src/hdy-swipe-tracker.c
index f7a5ec61..a78506d8 100644
--- a/src/hdy-swipe-tracker.c
+++ b/src/hdy-swipe-tracker.c
@@ -805,11 +805,11 @@ hdy_swipe_tracker_new (HdySwipeable *swipeable)
{
gpointer swipe_tracker;
- g_return_val_if_fail (swipeable != NULL, NULL);
+ g_return_val_if_fail (HDY_IS_SWIPEABLE (swipeable), NULL);
swipe_tracker = g_object_get_data (G_OBJECT (swipeable), "swipe-tracker");
- g_return_val_if_fail (swipe_tracker == NULL, NULL);
+ g_return_val_if_fail (!HDY_IS_SWIPE_TRACKER (swipe_tracker), NULL);
return g_object_new (HDY_TYPE_SWIPE_TRACKER,
"swipeable", swipeable,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]