efl_ui/scroll_manager: fix null derefs
authorMike Blumenkrantz <zmike@samsung.com>
Thu, 26 Sep 2019 21:59:49 +0000 (17:59 -0400)
committerJongmin Lee <jm105.lee@samsung.com>
Sun, 29 Sep 2019 21:18:39 +0000 (06:18 +0900)
Summary:
CID 1405811, 1405804
Depends on D10208

Reviewers: cedric

Reviewed By: cedric

Subscribers: cedric, #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D10209

src/lib/elementary/efl_ui_scroll_manager.c

index c210752..3d332e9 100644 (file)
@@ -610,8 +610,8 @@ _efl_ui_scroll_manager_efl_ui_scrollbar_bar_mode_get(const Eo *obj EINA_UNUSED,
                                                      Efl_Ui_Scrollbar_Mode *hmode,
                                                      Efl_Ui_Scrollbar_Mode *vmode)
 {
-    *hmode = sd->hbar_mode;
-    *vmode = sd->vbar_mode;
+    if (hmode) *hmode = sd->hbar_mode;
+    if (vmode) *vmode = sd->vbar_mode;
 }
 
 /* returns TRUE when we need to move the scroller, FALSE otherwise.