We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0357bc7 commit c957e93Copy full SHA for c957e93
crates/ark/src/ui/ui.rs
@@ -198,6 +198,15 @@ impl UiComm {
198
&self,
199
params: DidChangePlotsRenderSettingsParams,
200
) -> anyhow::Result<UiBackendReply, anyhow::Error> {
201
+ // The frontend shoudn't send invalid sizes but be defensive. Sometimes
202
+ // the plot container is in a strange state when it's hidden.
203
+ if params.settings.size.height <= 0 || params.settings.size.width <= 0 {
204
+ return Err(anyhow::anyhow!(
205
+ "Got invalid plot render size: {size:?}",
206
+ size = params.settings.size,
207
+ ));
208
+ }
209
+
210
self.graphics_device_tx
211
.send(GraphicsDeviceNotification::DidChangePlotRenderSettings(
212
params.settings,
0 commit comments