fix issue that filebox may throw exception(#191)
This commit is contained in:
parent
3b2a8551e3
commit
dcdeba7d2e
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* Filebox
|
* Filebox
|
||||||
* Nana C++ Library(http://www.nanapro.org)
|
* Nana C++ Library(http://www.nanapro.org)
|
||||||
* Copyright(C) 2003-2016 Jinhao(cnjinhao@hotmail.com)
|
* Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com)
|
||||||
*
|
*
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* Filebox
|
* Filebox
|
||||||
* Nana C++ Library(http://www.nanapro.org)
|
* Nana C++ Library(http://www.nanapro.org)
|
||||||
* Copyright(C) 2003-2016 Jinhao(cnjinhao@hotmail.com)
|
* Copyright(C) 2003-2017 Jinhao(cnjinhao@hotmail.com)
|
||||||
*
|
*
|
||||||
* Distributed under the Boost Software License, Version 1.0.
|
* Distributed under the Boost Software License, Version 1.0.
|
||||||
* (See accompanying file LICENSE_1_0.txt or copy at
|
* (See accompanying file LICENSE_1_0.txt or copy at
|
||||||
@ -997,6 +997,9 @@ namespace nana
|
|||||||
|
|
||||||
OPENFILENAME ofn;
|
OPENFILENAME ofn;
|
||||||
memset(&ofn, 0, sizeof ofn);
|
memset(&ofn, 0, sizeof ofn);
|
||||||
|
|
||||||
|
internal_scope_guard lock;
|
||||||
|
|
||||||
ofn.lStructSize = sizeof(ofn);
|
ofn.lStructSize = sizeof(ofn);
|
||||||
ofn.hwndOwner = reinterpret_cast<HWND>(API::root(impl_->owner));
|
ofn.hwndOwner = reinterpret_cast<HWND>(API::root(impl_->owner));
|
||||||
ofn.lpstrFile = &(wfile[0]);
|
ofn.lpstrFile = &(wfile[0]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user