mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
LV2 Client: Avoid potential nullptr deref when widget is not set by client UI
This commit is contained in:
parent
aaa204c608
commit
cad3e2f054
1 changed files with 3 additions and 0 deletions
|
|
@ -213,6 +213,9 @@ public:
|
|||
|
||||
Rectangle<int> getDetectedViewBounds() const
|
||||
{
|
||||
if (widget == nullptr)
|
||||
return {};
|
||||
|
||||
#if JUCE_MAC
|
||||
const auto frame = [(NSView*) widget frame];
|
||||
return { (int) frame.size.width, (int) frame.size.height };
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue