Commit 1cdbc899 authored by Tobias WEBER's avatar Tobias WEBER

more checks

parent c0fb21c3
...@@ -769,7 +769,7 @@ void GlPlot_impl::SetScreenDims(int w, int h) ...@@ -769,7 +769,7 @@ void GlPlot_impl::SetScreenDims(int w, int h)
void GlPlot_impl::resizeGL() void GlPlot_impl::resizeGL()
{ {
if(!m_bPlatformSupported) return; if(!m_bPlatformSupported || !m_bInitialised) return;
const int w = m_iScreenDims[0]; const int w = m_iScreenDims[0];
const int h = m_iScreenDims[1]; const int h = m_iScreenDims[1];
...@@ -1410,7 +1410,8 @@ void GlPlot::initializeGL() ...@@ -1410,7 +1410,8 @@ void GlPlot::initializeGL()
if constexpr(!m_isthreaded) if constexpr(!m_isthreaded)
{ {
m_impl->initialiseGL(); m_impl->initialiseGL();
emit AfterGLInitialisation(); if(m_impl->IsInitialised())
emit AfterGLInitialisation();
} }
} }
......
...@@ -264,6 +264,8 @@ public: ...@@ -264,6 +264,8 @@ public:
void SetBTrafo(const t_mat_gl& matB, const t_mat_gl* matA = nullptr); void SetBTrafo(const t_mat_gl& matB, const t_mat_gl* matA = nullptr);
void SetCoordSys(int iSys); void SetCoordSys(int iSys);
bool IsInitialised() const { return m_bInitialised; }
public /*slots*/: public /*slots*/:
void paintGL(); void paintGL();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment