From 0ad791dee0869da9d9733d28625a79760af5e64b Mon Sep 17 00:00:00 2001 From: falkTX Date: Thu, 27 Jul 2023 11:51:54 +0200 Subject: [PATCH] Do not crash when window creation fails (e.g. running headless) Signed-off-by: falkTX --- carla | 2 +- dpf | 2 +- src/override/Window.cpp | 4 +--- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/carla b/carla index 604416b..62e17bf 160000 --- a/carla +++ b/carla @@ -1 +1 @@ -Subproject commit 604416bf33bcf16410e43009f6d94b86dd41afcd +Subproject commit 62e17bf0e180ec97aa227f142fc3274602aa554f diff --git a/dpf b/dpf index 044b74c..227a701 160000 --- a/dpf +++ b/dpf @@ -1 +1 @@ -Subproject commit 044b74cb9326c82375ebd65a2020ad0565a19f8e +Subproject commit 227a7015a85deeed52eb2c58456303c201674118 diff --git a/src/override/Window.cpp b/src/override/Window.cpp index 776c9e1..e5a0748 100644 --- a/src/override/Window.cpp +++ b/src/override/Window.cpp @@ -603,9 +603,7 @@ static void Window__writeImagePNG(void* context, void* data, int size) { void Window::step() { - DISTRHO_SAFE_ASSERT_RETURN(internal->tlw != nullptr,); - - if (vg == nullptr) + if (internal->tlw == nullptr || vg == nullptr) return; double frameTime = system::getTime();