[beast: 1/10] BST: add missing NULL check before accessing item's proxy_id(), fixes #22



commit 9bc9336b3a3859469a71e978fbb4abb9f811f6ea
Author: Tim Janik <timj gnu org>
Date:   Tue Oct 10 00:52:37 2017 +0200

    BST: add missing NULL check before accessing item's proxy_id(), fixes #22
    
    Signed-off-by: Tim Janik <timj gnu org>

 beast-gtk/bstparam-proxy.cc |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/beast-gtk/bstparam-proxy.cc b/beast-gtk/bstparam-proxy.cc
index f03b966..82791aa 100644
--- a/beast-gtk/bstparam-proxy.cc
+++ b/beast-gtk/bstparam-proxy.cc
@@ -145,7 +145,7 @@ param_proxy_changed (GtkWidget *entry,
              }
        }
       /* we get lots of notifications from focus-out, so try to optimize */
-      if (sfi_value_get_proxy (&param->value) != item.proxy_id())
+      if (sfi_value_get_proxy (&param->value) != (item ? item.proxy_id() : 0))
        {
          sfi_value_set_proxy (&param->value, item.proxy_id());
          gxk_param_apply_value (param);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]