[DEV] add missing check of nullptr in wayland backend
This commit is contained in:
parent
ae21bbff96
commit
714dcf4128
@ -259,7 +259,7 @@ gale::Context::Context(gale::Application* _application, int32_t _argc, const cha
|
|||||||
// create thread to manage real periodic event
|
// create thread to manage real periodic event
|
||||||
m_periodicThread = ememory::makeShared<PeriodicThread>(this);
|
m_periodicThread = ememory::makeShared<PeriodicThread>(this);
|
||||||
m_periodicThread->start();
|
m_periodicThread->start();
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(2000));
|
std::this_thread::sleep_for(std::chrono::milliseconds(1));
|
||||||
|
|
||||||
// By default we set 2 themes (1 color and 1 shape ...) :
|
// By default we set 2 themes (1 color and 1 shape ...) :
|
||||||
etk::theme::setNameDefault("GUI", "shape/square/");
|
etk::theme::setNameDefault("GUI", "shape/square/");
|
||||||
|
@ -1526,6 +1526,10 @@ class WAYLANDInterface : public gale::Context {
|
|||||||
void setTitle(const std::string& _title) {
|
void setTitle(const std::string& _title) {
|
||||||
WAYLAND_INFO("WAYLAND: set Title (START)");
|
WAYLAND_INFO("WAYLAND: set Title (START)");
|
||||||
m_uniqueWindowsName = _title;
|
m_uniqueWindowsName = _title;
|
||||||
|
if (m_shellSurface == nullptr) {
|
||||||
|
GALE_ERROR("WAYLAND: set Title (END) ==> missing surface pointer");
|
||||||
|
return;
|
||||||
|
}
|
||||||
wl_shell_surface_set_title(m_shellSurface, m_uniqueWindowsName.c_str());
|
wl_shell_surface_set_title(m_shellSurface, m_uniqueWindowsName.c_str());
|
||||||
WAYLAND_INFO("WAYLAND: set Title (END)");
|
WAYLAND_INFO("WAYLAND: set Title (END)");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user