def METHOD_NAME(self) -> None:
    # On Mac OS X, this function may get called by a main window resize signal during closing.
    # This will cause a crash, so don't do anything when it is shutting down.
    import UM.Qt.QtApplication
    if UM.Qt.QtApplication.QtApplication.getInstance().isShuttingDown():
        return
    if self._width <= 0 or self._height <= 0:
        Logger.log("w", "Tried to create render pass with size <= 0")
        return
    self._fbo = OpenGL.getInstance().createFrameBufferObject(self._width, self._height)