From 8c0dfb6875921da6203d58be6c99c60d865d2807 Mon Sep 17 00:00:00 2001 From: itsmattkc Date: Sun, 26 Jan 2020 12:22:30 +1100 Subject: [PATCH] imagestream: fixed segfault when changing a project's default input colorspace --- app/project/item/footage/imagestream.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/project/item/footage/imagestream.cpp b/app/project/item/footage/imagestream.cpp index ac95cc420..4cc187623 100644 --- a/app/project/item/footage/imagestream.cpp +++ b/app/project/item/footage/imagestream.cpp @@ -34,7 +34,11 @@ ImageStream::ImageStream() : void ImageStream::FootageSetEvent(Footage *f) { // For some reason this connection fails if we don't explicitly specify DirectConnection - connect(f->project()->color_manager(), SIGNAL(ConfigChanged()), this, SLOT(ColorConfigChanged()), Qt::DirectConnection); + connect(f->project()->color_manager(), + &ColorManager::ConfigChanged, + this, + &ImageStream::ColorConfigChanged, + Qt::DirectConnection); } void ImageStream::LoadCustomParameters(QXmlStreamReader *reader) @@ -107,7 +111,7 @@ void ImageStream::set_colorspace(const QString &color) void ImageStream::ColorConfigChanged() { - ColorManager* color_manager = static_cast(sender()); + ColorManager* color_manager = footage()->project()->color_manager(); // Check if this colorspace is in the new config if (!colorspace_.isEmpty()) {