From ed8d89125a0d486d9ba937fef66a0dcbeff5a35c Mon Sep 17 00:00:00 2001 From: reuk Date: Thu, 3 Jul 2025 15:59:44 +0100 Subject: [PATCH] DemoRunner: Make parentSizeChanged() robust to calls made before the content component is set --- examples/DemoRunner/Source/Main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/DemoRunner/Source/Main.cpp b/examples/DemoRunner/Source/Main.cpp index edc8c955d3..322a785b4e 100644 --- a/examples/DemoRunner/Source/Main.cpp +++ b/examples/DemoRunner/Source/Main.cpp @@ -154,7 +154,8 @@ private: #if JUCE_IOS || JUCE_ANDROID void parentSizeChanged() override { - getMainComponent().resized(); + if (auto* comp = getContentComponent()) + comp->resized(); } #endif