From ad8a6b4a885f5cf1106c2eb2a1ea2d18a8f0e9f3 Mon Sep 17 00:00:00 2001 From: Younguk Kim Date: Sun, 2 Dec 2018 14:44:40 +0900 Subject: [PATCH 1/3] display: fix pointer casting in get_pointer() --- panda/src/windisplay/winGraphicsWindow.cxx | 2 +- panda/src/x11display/x11GraphicsWindow.cxx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/panda/src/windisplay/winGraphicsWindow.cxx b/panda/src/windisplay/winGraphicsWindow.cxx index 40760ca1d9..195189ac9e 100644 --- a/panda/src/windisplay/winGraphicsWindow.cxx +++ b/panda/src/windisplay/winGraphicsWindow.cxx @@ -138,7 +138,7 @@ get_pointer(int device) const { double time = ClockObject::get_global_clock()->get_real_time(); result._xpos = cpos.x; result._ypos = cpos.y; - ((GraphicsWindowInputDevice &)_input_devices[0]).set_pointer_in_window(result._xpos, result._ypos, time); + ((GraphicsWindowInputDevice *)_input_devices[0].p())->set_pointer_in_window(result._xpos, result._ypos, time); } } return result; diff --git a/panda/src/x11display/x11GraphicsWindow.cxx b/panda/src/x11display/x11GraphicsWindow.cxx index ef86c82166..caaacc4a9c 100644 --- a/panda/src/x11display/x11GraphicsWindow.cxx +++ b/panda/src/x11display/x11GraphicsWindow.cxx @@ -164,7 +164,7 @@ get_pointer(int device) const { double time = ClockObject::get_global_clock()->get_real_time(); result._xpos = event.xbutton.x; result._ypos = event.xbutton.y; - ((GraphicsWindowInputDevice &)_input_devices[0]).set_pointer_in_window(result._xpos, result._ypos, time); + ((GraphicsWindowInputDevice *)_input_devices[0].p())->set_pointer_in_window(result._xpos, result._ypos, time); } x11GraphicsPipe::_x_mutex.release(); } From cf277ebf6c706215b127de4b2bf191bc4f74a0e0 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 2 Dec 2018 12:13:58 +0100 Subject: [PATCH 2/3] maya2egg: fix a potential crash (see #434) --- pandatool/src/mayaegg/mayaEggLoader.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pandatool/src/mayaegg/mayaEggLoader.cxx b/pandatool/src/mayaegg/mayaEggLoader.cxx index 68fcb8d0f7..a60e5d2372 100644 --- a/pandatool/src/mayaegg/mayaEggLoader.cxx +++ b/pandatool/src/mayaegg/mayaEggLoader.cxx @@ -975,7 +975,9 @@ MayaEggMesh *MayaEggLoader::GetMesh(EggVertexPool *pool, EggGroup *parent) MayaEggMesh *result = _mesh_tab[parent]; if (result == 0) { result = new MayaEggMesh; - result->_name = parent->get_name(); + if (parent != nullptr) { + result->_name = parent->get_name(); + } result->_pool = pool; result->_parent = parent; result->_vert_count = 0; From 43ce32478fb17db29a5bc861fae02380944968f5 Mon Sep 17 00:00:00 2001 From: kamgha Date: Sun, 2 Dec 2018 12:17:04 +0100 Subject: [PATCH 3/3] makepanda: find OpenEXR 2.3 and its static variant for MSVC Closes #463 --- makepanda/makepanda.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 608648d5a1..43c42e5fd9 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -647,10 +647,17 @@ if (COMPILER == "MSVC"): suffix = "" if os.path.isfile(GetThirdpartyDir() + "openexr/lib/IlmImf-2_2.lib"): suffix = "-2_2" + elif os.path.isfile(GetThirdpartyDir() + "openexr/lib/IlmImf-2_3.lib"): + suffix = "-2_3" + if os.path.isfile(GetThirdpartyDir() + "openexr/lib/IlmImf" + suffix + "_s.lib"): + suffix += "_s" LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/IlmImf" + suffix + ".lib") LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/IlmThread" + suffix + ".lib") LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Iex" + suffix + ".lib") - LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Half.lib") + if suffix == "-2_2": + LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Half.lib") + else: + LibName("OPENEXR", GetThirdpartyDir() + "openexr/lib/Half" + suffix + ".lib") IncDirectory("OPENEXR", GetThirdpartyDir() + "openexr/include/OpenEXR") if (PkgSkip("JPEG")==0): LibName("JPEG", GetThirdpartyDir() + "jpeg/lib/jpeg-static.lib") if (PkgSkip("ZLIB")==0): LibName("ZLIB", GetThirdpartyDir() + "zlib/lib/zlibstatic.lib") @@ -681,8 +688,7 @@ if (COMPILER == "MSVC"): IncDirectory("FCOLLADA", GetThirdpartyDir() + "fcollada/include/FCollada") if (PkgSkip("ASSIMP")==0): LibName("ASSIMP", GetThirdpartyDir() + "assimp/lib/assimp.lib") - path = GetThirdpartyDir() + "assimp/lib/IrrXML.lib" - if os.path.isfile(path): + if os.path.isfile(GetThirdpartyDir() + "assimp/lib/IrrXML.lib"): LibName("ASSIMP", GetThirdpartyDir() + "assimp/lib/IrrXML.lib") IncDirectory("ASSIMP", GetThirdpartyDir() + "assimp/include") if (PkgSkip("SQUISH")==0):