[niepce] fwk: make sure we don't pass a nullptr as a PropertyBag
- From: Hubert Figuière <hub src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [niepce] fwk: make sure we don't pass a nullptr as a PropertyBag
- Date: Tue, 18 Feb 2020 05:44:19 +0000 (UTC)
commit 48ec61120d8e2f63d90c7636f9f105cc4ef86559
Author: Hubert Figuière <hub figuiere net>
Date: Sun Feb 16 20:08:48 2020 -0500
fwk: make sure we don't pass a nullptr as a PropertyBag
src/fwk/toolkit/metadatawidget.cpp | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/fwk/toolkit/metadatawidget.cpp b/src/fwk/toolkit/metadatawidget.cpp
index c24eb12..776aead 100644
--- a/src/fwk/toolkit/metadatawidget.cpp
+++ b/src/fwk/toolkit/metadatawidget.cpp
@@ -241,7 +241,8 @@ void MetaDataWidget::set_data_source(const fwk::PropertyBagPtr& properties)
this->clear_widget(p);
});
}
- bool is_empty = fwk_property_bag_is_empty(properties.get());
+ bool is_empty =
+ static_cast<bool>(properties) ? fwk_property_bag_is_empty(properties.get()) : true;
set_sensitive(!is_empty);
if(is_empty) {
return;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]